Skip to content

Commit dd85f89

Browse files
authored
Merge pull request #2144 from didi/fix-swiper-nocircular
修复onUpdate transdir
2 parents 1b4a2d4 + a54e0f4 commit dd85f89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/webpack-plugin/lib/runtime/components/react/mpx-swiper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ const SwiperWrapper = forwardRef<HandlerRef<View, SwiperProps>, SwiperProps>((pr
755755
const moveDistance = e[strAbso] - preAbsolutePos.value
756756
const eventData = {
757757
translation: moveDistance,
758-
transdir: moveDistance !== 0 ? moveDistance : e[strAbso] - moveTranstion.value
758+
transdir: moveDistance
759759
}
760760
// 1. 支持滑动中超出一半更新索引的能力:只更新索引并不会影响onFinalize依据当前offset计算的索引
761761
const { half } = computeHalf(eventData)

0 commit comments

Comments
 (0)