Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swiper's goto function does not go the correct index #366

Closed
qq1037305420 opened this issue Mar 19, 2019 · 1 comment
Closed

Swiper's goto function does not go the correct index #366

qq1037305420 opened this issue Mar 19, 2019 · 1 comment
Assignees
Labels
bug Something isn't working @Components Components related

Comments

@qq1037305420
Copy link

qq1037305420 commented Mar 19, 2019

Mand Mobile 2.1.6
image

sampleData = ['0', '1', '2', '3', '4', '5', '6', '7']
this.$refs.swiper.goto(0) => 7
this.$refs.swiper.goto(1) => 1
this.$refs.swiper.goto(2) => 1 (nothing happens)
this.$refs.swiper.goto(3) => 3

for more details

新建文本文档.txt

@xxyan0205 xxyan0205 added the need reproduce Need to reproduce the problem site label Mar 19, 2019
@yccq
Copy link

yccq commented Mar 22, 2019

我也遇到这个问题 goto 0的时候 去的是最后一个,然后中间间隔数的偶尔触发不了goto。

一共有0~4 ,下面是我打印的值 如果 k 1 from 0 to 1 是正常的,下面的数值有一些不正常响应。

k 0
Forex.vue?00e8:62 from 4
Forex.vue?00e8:63 to 4
Forex.vue?00e8:67 k 1
Forex.vue?00e8:62 from 0
Forex.vue?00e8:63 to 1
Forex.vue?00e8:67 k 2
Forex.vue?00e8:67 k 3
Forex.vue?00e8:62 from 2
Forex.vue?00e8:63 to 3
3Forex.vue?00e8:67 k 4
Forex.vue?00e8:67 k 2
Forex.vue?00e8:62 from 1
Forex.vue?00e8:63 to 2

@xxyan0205 xxyan0205 added bug Something isn't working @Components Components related and removed need reproduce Need to reproduce the problem site labels Mar 26, 2019
xxyan0205 added a commit that referenced this issue Apr 6, 2019
first distinguish real index & display index, and then transform display index to real index before
call translate in goto

#366
@xxyan0205 xxyan0205 self-assigned this Apr 6, 2019
moyus pushed a commit that referenced this issue Apr 9, 2019
first distinguish real index & display index, and then transform display index to real index before
call translate in goto

#366
@moyus moyus closed this as completed Apr 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working @Components Components related
Projects
None yet
Development

No branches or pull requests

4 participants