vue-awesome-swiper 设置autoplay一开始会自动播放,触摸后,自动播放停止无效了

vue-awesome-swiper 设置autoplay一开始会自动播放,触摸后,自动播放停止无效了,

是这个插件的bug吗,还是什么原因。求大神指导

阅读 18.1k
3 个回答

在swiperOption里加上

            autoplay: {
                disableOnInteraction: false,
              }
新手上路,请多包涵

在swiper.js中有一个autoplayDisableOnInteraction参数,设置为false,就可以了。
用户操作swiper之后,是否禁止autoplay。默认为true:停止。
如果设置为false,用户操作swiper之后自动切换不会停止,每次都会重新启动autoplay。
操作包括触碰,拖动,点击pagination等

应该是你没有将data中的swiperOption 设置到template中

clipboard.png

推荐问题