Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
401 views
in Technique[技术] by (71.8m points)

Vue使用vue-awesome-swiper 某些配置无效

包版本

swiper 版本:6.1.1
vue-awesome-swiper 版本 4.1.1

使用官方提供的使用方式,在配置autoplay这一项时无法实现自动播放效果,其他的配置项就可以。

配置项代码如下,loop和speed等皆可以正常运行,唯独autoplay项无论是设置为true皆不可正常自动播放。

已经找过网上的资源,没能解决。

swiperOption: {
                    // 如果需要分页器
                    pagination: {
                        el: ".swiper-pagination",
                    },
                    initialSlide :0,    // 初始值
                    speed:2000,
                    autoplay: {
                        delay: 500,
                        stopOnLastSlide: false,
                        disableOnInteraction: false,
                    },
                    loop:true,          // 闭环播放
                  
                },
            }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

试试把swiper的本版 降到4x 我本来swiper的版本跟你一样,我的是 上一页 下一页不起作用,然后分页器出不来,版本降了一下就好了。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...