diff --git a/packages/vant/src/composables/use-touch.ts b/packages/vant/src/composables/use-touch.ts index ffb5e8cc5..0525c42d9 100644 --- a/packages/vant/src/composables/use-touch.ts +++ b/packages/vant/src/composables/use-touch.ts @@ -41,7 +41,7 @@ export function useTouch() { const move = ((event: TouchEvent) => { const touch = event.touches[0]; // safari back will set clientX to negative number - deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value; + deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value; deltaY.value = touch.clientY - startY.value; offsetX.value = Math.abs(deltaX.value); offsetY.value = Math.abs(deltaY.value);