From da1a3c5b7a4ffefa229f2418207d9b4dad54e753 Mon Sep 17 00:00:00 2001 From: xifanTT <514329552@qq.com> Date: Wed, 18 Dec 2024 15:52:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E6=BB=91=E5=8A=A8?= =?UTF-8?q?=E9=98=88=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/_util/useSwipe.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_util/useSwipe.ts b/src/_util/useSwipe.ts index 9a2936b3..195b6975 100644 --- a/src/_util/useSwipe.ts +++ b/src/_util/useSwipe.ts @@ -48,7 +48,7 @@ export function useSwipe(target: EventTarget | null | undefined, options = {} as const coordsStart = useRef({ x: 0, y: 0 }); // 用于存储触摸起始位置的坐标 const coordsEnd = useRef({ x: 0, y: 0 }); // 用于存储触摸结束位置的坐标 const coordsOffset = useRef({ x: 0, y: 0 }); // 用于存储滑动偏移量 - const { threshold = 50, onSwipe, onSwipeEnd, onSwipeStart, listenerOptions = { passive: true } } = options; + const { threshold = 0, onSwipe, onSwipeEnd, onSwipeStart, listenerOptions = { passive: true } } = options; const updateOffset = useCallback(() => { coordsOffset.current = {