前端 解决swiper js 手动滑动一下后不能自动播放

用户操作swiper之后,是否禁止autoplay。默认为true:停止。
如果设置为false,用户操作swiper之后自动切换不会停止,每次都会重新启动autoplay。
操作包括触碰,拖动,点击pagination等。

参数是: autoplayDisableOnInteraction

示例:

 <script>

   var mySwiper = new Swiper('.swiper-container',

    {

      autoplay : 5000,

      autoplayDisableOnInteraction : false,

    })

</script>

原文地址:https://www.cnblogs.com/xiezhonglong/p/5759980.html