Skip to content

Commit

Permalink
fix: 调整滑动阈值
Browse files Browse the repository at this point in the history
  • Loading branch information
xifanTT committed Dec 18, 2024
1 parent 9d979de commit da1a3c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/_util/useSwipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function useSwipe(target: EventTarget | null | undefined, options = {} as
const coordsStart = useRef<Position>({ x: 0, y: 0 }); // 用于存储触摸起始位置的坐标
const coordsEnd = useRef<Position>({ x: 0, y: 0 }); // 用于存储触摸结束位置的坐标
const coordsOffset = useRef<Position>({ 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 = {
Expand Down

0 comments on commit da1a3c5

Please sign in to comment.