Skip to content

Commit b6a753c

Browse files
author
luyongfang
committed
修复安卓部分机型onFinalize拿到的值不对
1 parent 27473dc commit b6a753c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,10 @@ const SwiperWrapper = forwardRef<HandlerRef<View, SwiperProps>, SwiperProps>((pr
791791
}
792792
preAbsolutePos.value = e[strAbso]
793793
})
794+
.onEnd((e: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => {
795+
// 修复某些安卓机型小米 onFinalize拿到的absolute值不正确的问题, onUpdate并不是最终的值
796+
preAbsolutePos.value = e[strAbso]
797+
})
794798
.onFinalize((e: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => {
795799
'worklet'
796800
if (touchfinish.value) return

0 commit comments

Comments
 (0)