let appSwiper = new Swiper ('.applet-swiper-container', {
	    direction: 'horizontal', // 垂直切换选项
	    loop: true, // 循环模式选项
	    autoplay: true,
	  });

autoplay:true 默认delay为 3000(ms)

结果不管作用,图片切换快得飞起。

最后发现是swiper.js不同版本的写法不一样!!

官方最新文档是Swiper4/5 的版本,以上是最4.x / 5.x版本的写法。

但我引入的swiper.js是3.x版本的,3.x版本写法是不一样的。

3.x版本的配置写法是 autoplay: 3000;

 改成这样就好了(细节看文档)。

附上不同版本不同配置写法的官方地址:https://www.swiper.com.cn/api/index.html

(教训:一定要看清楚文档阿......)

相关文章:

  • 2022-12-23
  • 2021-11-26
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
  • 2021-08-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-04-28
  • 2022-12-23
  • 2022-01-15
  • 2021-04-24
  • 2022-12-23
相关资源
相似解决方案