React
-用swiper
实现多行交错、同速、跑马灯效果的弹幕式轮播(坑)
【React
-用swiper
实现多行交错、同速、跑马灯效果的弹幕式轮播】的完整介绍可以查看我的另外一篇博文哦
一、坑💥 —— 介绍
二、坑💥 —— 解决
// fixed: 多行swiper情况下,第一次进入页面时,某一行 出现 先快后慢、滑动一轮后才和其余几行达成一致 的步调
componentDidMount() {
this.carouselSwiper?.autoplay.stop(); // 关闭自动切换
// 加个延时
setTimeout(() => {
this.carouselSwiper?.autoplay.start(); // 开启自动切换
},500)
}