first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
【完成】1:initialSlide 默认展示第几张图
2:direction 设置滚动方向:vertical 垂直 ,horizontal 水平
【完成】3:speed 设置轮播滚动时候的速度
【完成】4:grabCursor : true 设置鼠标形状为手
【完成】5:slideChange 监听轮播图滚动到第几张了
var mySwiper = new Swiper('.swiper-container', {
on: {
slideChange: function () {
console.log(this.activeIndex);
},
},
};
var mySwiper = new Swiper('.swiper-container');
mySwiper.on('slideChange', function () {
});
6:loop 是否可以循环滚动 true 可以, false 不可以
【完成】7:autoplay 是否自动播放
【完成】8:time 每隔几秒播放一次
【完成】9:slideTo 方法,控制轮播图切换到对应的下标
mySwiper.slideTo(0, 1000, false);//切换到第一个slide,速度为1秒