Skip to content

Commit

Permalink
修复起点offset
Browse files Browse the repository at this point in the history
  • Loading branch information
luyongfang committed Jan 13, 2025
1 parent 51ffdf1 commit 1e8d314
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ const SwiperWrapper = forwardRef<HandlerRef<View, SwiperProps>, SwiperProps>((pr
const iStep = dir === 'x' ? realWidth : realHeight
step.value = iStep
if (touchfinish.value) {
offset.value = getOffset(currentIndex.value, iStep)
offset.value = getOffset(props.current || 0, iStep)
// useEffect中没拿到step.value之前不会开启loop,有step直接开启layout后取消再开启,无step依赖layout结束后开启
pauseLoop()
resumeLoop()
Expand Down

0 comments on commit 1e8d314

Please sign in to comment.