页面滚动
<swiper indicator-dots="true" autoplay="true" interval="3000">
<swiper-item wx:for="{
{list}}">
<image src="{
{item}}" style="width:100%;height:40vh"></image>
</swiper-item>
</swiper>
注释:indicator-dots:是否显示面板指示点;autoplay:是否自动切换;interval:自动切换时间间隔;
js
data:{
list:["/img/a11.jpg","/img/a12.jpg","/img/a13.jpg"]
}
}
整体
html
<view class="index-nav"