微信小程序基础

swiper  轮播图

用法如下:

autoplay :是否自动播放,默认false

indicator-dots: 是否显示面板指示点,默认false

current:当前所在滑块的 index,默认0

interval:自动切换时间间隔,默认5000毫秒

circular:是否采用衔接滑动,默认false

indicator-active-color:当前选中的指示点颜色,默认#000000 黑色

<swiper autoplay="true" indicator-dots="true" current="0" interval="2000" duration="1000" circular="true" indicator-active-color="#fff">
    <block>
        <swiper-item>
            <image src="/Images/home/first.jpg" class="swiper-image"/>
        </swiper-item>
        <swiper-item>
            <image src="/Images/home/second.jpg" class="swiper-image"/>
        </swiper-item>
    </block>
</swiper>