@@ -645,7 +645,8 @@ function drag(e, el, opt) {
645645 const rect = el . getBoundingClientRect ( ) ;
646646 // --- 创建拖拽指示器 ---
647647 dragEl = document . createElement ( 'div' ) ;
648- dragEl . style . cssText = `position:fixed;left:${ rect . left } px;top:${ rect . top } px;width:${ rect . width } px;height:${ rect . height } px;background:rgba(0,0,0,0.1);border:1px dashed #666;pointer-events:none;z-index:999999;` ;
648+ dragEl . style . cssText = `position:fixed;left:${ rect . left } px;top:${ rect . top } px;width:${ rect . width } px;height:${ rect . height } px;background:rgba(255,255,255,.8);border:1px dashed rgba(0,0,0,.8);filter:drop-shadow(0 4px 12px rgba(0,0,0,.3));pointer-events:none;z-index:999999;` ;
649+ dragEl . style . borderRadius = getComputedStyle ( el ) . borderRadius ;
649650 document . body . appendChild ( dragEl ) ;
650651 otop = rect . top ;
651652 oleft = rect . left ;
@@ -861,8 +862,8 @@ function getGestureEl() {
861862 if ( ! gestureEl ) {
862863 gestureEl = document . createElement ( 'div' ) ;
863864 gestureEl . className = 'pointer-gesture' ;
864- gestureEl . style . cssText = `position:fixed;width:20px;height:20px;border-radius:50%;background:rgba(0,0,0,0.3);pointer-events:none;z-index:999999;opacity:0;transition:opacity 0.2s;transform-origin:center;` ;
865865 document . body . appendChild ( gestureEl ) ;
866+ gestureEl . insertAdjacentHTML ( 'afterend' , `<style>.pointer-gesture{position:fixed;width:20px;height:20px;border-radius:50%;background:rgba(0,0,0,0.7);border:1px solid rgba(255,255,255,.9);pointer-events:none;z-index:999999;opacity:0;transition:opacity 0.2s;transform-origin:center;display:flex;align-items:center;justify-content:center;filter:drop-shadow(0 4px 12px rgba(0,0,0,.3));}.pointer-gesture-done::before{content:'';background:rgba(255,255,255,.7);border-radius:50%;width:10px;height:10px;}</style>` ) ;
866867 }
867868 return gestureEl ;
868869}
@@ -949,7 +950,7 @@ function gesture(oe, before, handler) {
949950 offset = ( dir === 'top' || dir === 'left' ) ? pos - origin : origin - pos ;
950951 offset = Math . max ( 0 , Math . min ( 90 , offset ) ) ;
951952 g . style . opacity = offset > 0 ? '1' : '0' ;
952- g . classList . toggle ( 'done' , offset >= 90 ) ;
953+ g . classList . toggle ( 'pointer-gesture- done' , offset >= 90 ) ;
953954 updateGestureStyle ( rect , dir , offset ) ;
954955 } ,
955956 end : ( ) => {
@@ -1009,7 +1010,7 @@ function gesture(oe, before, handler) {
10091010 }
10101011 g . style . opacity = '1' ;
10111012 let offset = Math . min ( 90 , gestureWheel . offset / 1.38 ) ;
1012- g . classList . toggle ( 'done' , offset >= 90 ) ;
1013+ g . classList . toggle ( 'pointer-gesture- done' , offset >= 90 ) ;
10131014 updateGestureStyle ( rect , gestureWheel . dir , offset ) ;
10141015 clearTimeout ( gestureWheel . timer ) ;
10151016 if ( offset < 90 ) {
0 commit comments