ant-design/ant-design-mobile

`swiperRef.swipeTo`在连续跨越loop边界时会混乱

Open

#6261 opened on Jul 19, 2023

View on GitHub
 (4 comments) (1 reaction) (0 assignees)TypeScript (11,238 stars) (2,313 forks)batch import
bughelp wanted

Description

Version of antd-mobile

5.32.0

Operating system and its version

No response

Browser and its version

Edge114

Sandbox to reproduce

https://codesandbox.io/s/interesting-sanderson-qzhw35

What happened?

以sandbox中的例子,Swiper中有6个Item

  • 通过swipeTo(index)连续快速切换-1和0位置时表现正常; 切换到-1并等待动画结束后再切换到0就会向另一个方向滚动
  • 连续切换-1和6位置时表现与上面相反: 慢速时正常,快速切换时方向错误

Relevant log output

No response

Contributor guide