常用属性
属性 | 类型 | 默认值 | 说明 |
---|---|---|---|
indicator-dots | boolean | false | 是否显示面板指示点 |
indicator-color | color | rgba(0,0,0,.3) | 指示点颜色 |
indicator-active-color | color | #000000 | 当前选中的指示点颜色 |
autoplay | boolean | false | 是否自动切换 |
interval-dots | number | 5000 | 自动切换时间间隔 |
circular | boolean | false | 是否采用衔接滑动 |
代码示例
<swiper indicator-dots autoplay interval="500" circular>
<swiper-item>
<image src="/images/01.jpg" mode="" />
</swiper-item>
<swiper-item>
<image src="/images/02.jpg" mode="" />
</swiper-item>
<swiper-item>
<image src="/images/03.jpg" mode="" />
</swiper-item>
</swiper>
效果示例图