鍍金池/ 問答/HTML/ 關(guān)于swiper 輪播圖,手勢(shì)滑動(dòng)以后不能繼續(xù)輪播的問題;?

關(guān)于swiper 輪播圖,手勢(shì)滑動(dòng)以后不能繼續(xù)輪播的問題;?

swiper 輪播圖,手勢(shì)滑動(dòng)以后不能繼續(xù)輪播的問題;
去了解了一下, 發(fā)現(xiàn)有個(gè)屬性: autoplayDisableOnInteraction: false 是用來(lái)控制 手勢(shì)滑動(dòng)過以后,依然能夠重啟輪播的屬性,但是我加上去以后并不管用。
我用的是swiper4.0.5 感覺應(yīng)該是版本的問題 ,我試了其他版本,發(fā)現(xiàn)是能夠起作用的。
但是因?yàn)楦鞣N原因,沒辦法改變版本, 求教,4X版本是有問題嗎? 為什么不支持這個(gè)屬性

mySwiper4 = new Swiper('.slotMachinesinfo .swiper-container', {
      direction: 'vertical',
      loop: true,
      autoplay: true,
      speed: 800,
      autoplayDisableOnInteraction: false
    });

而且更過分的是 autoplay 后面不能寫毫秒數(shù),必須為true;否則就不輪播

回答
編輯回答
入她眼

swiper4做了組件化的深化,可能是把a(bǔ)utoplayDisableOnInteraction放到了autoplay里面了,你可以試試:

mySwiper4 = new Swiper('.slotMachinesinfo .swiper-container', {
    direction: 'vertical',
    loop: true,
    autoplay: true,
    speed: 800,
    autoplay: {
        disableOnInteraction: false
    }
});

2017年3月8日 12:05