diff --git a/packages/vant/src/swipe/Swipe.tsx b/packages/vant/src/swipe/Swipe.tsx index 3fd947fb1..370c87af2 100644 --- a/packages/vant/src/swipe/Swipe.tsx +++ b/packages/vant/src/swipe/Swipe.tsx @@ -123,7 +123,9 @@ export default defineComponent({ const trackStyle = computed(() => { const style: CSSProperties = { transitionDuration: `${state.swiping ? 0 : props.duration}ms`, - transform: `translate${props.vertical ? 'Y' : 'X'}(${state.offset}px)`, + transform: `translate${ + props.vertical ? 'Y' : 'X' + }(${+state.offset.toFixed(2)}px)`, }; if (size.value) {