提交 af0367d7 编写于 作者: D DCloud_LXH

fix: swiper switch fixed #2985

上级 c076fd00
......@@ -444,12 +444,22 @@ export default {
position -= length
}
} else if (n > 0) {
/**
* current -> 1
* position -> 2
* length -> 3
*
* position -> -1
*/
for (; position > current;) {
position -= length
}
for (; position + length < current;) {
position += length
}
if (position + length - current < current - position) {
position += length
}
} else {
for (; position + length < current;) {
position += length
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册