소스 검색

修复 cl-popup 在拖动关闭位置错误问题

icssoa 4 달 전
부모
커밋
9e84157463
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      uni_modules/cool-ui/components/cl-popup/cl-popup.uvue

+ 1 - 1
uni_modules/cool-ui/components/cl-popup/cl-popup.uvue

@@ -409,7 +409,7 @@ function onTouchMove(e: UniTouchEvent) {
 		swipe.isMove = true;
 
 		// 计算Y轴偏移量
-		const offsetY = (e.touches[0] as UniTouch).pageY - swipe.startY;
+		const offsetY = (e.touches[0] as UniTouch).clientY - swipe.startY;
 
 		// 只允许向下滑动(offsetY > 0)
 		if (offsetY > 0) {