<swiper :style="{'min-height':height + 'px'}" :current="active" duration="0" @change="swiperChange">
如果change事件来回切换,手速再快点,然后就停下,它自己就来回无限循环切换了.
说明下,我用了全局变量,当change事件后,就改变:current的值,正常情况下没啥,但是手速快了就不行了
<swiper :style="{'min-height':height + 'px'}" :current="active" duration="0" @change="swiperChange">
如果change事件来回切换,手速再快点,然后就停下,它自己就来回无限循环切换了.
说明下,我用了全局变量,当change事件后,就改变:current的值,正常情况下没啥,但是手速快了就不行了
深海智行
这一般是人的问题,change事件内异步修改current的值就会这样,比如手都滑动到第二个了,你代码又把值修改为1,而swiper切换到1的时候,你又设置为2
2019-07-06 17:22