轮播图
发布于 5 年前 作者 minshao 17683 次浏览 来自 问答

轮播图指示点的颜色怎么改变不了

5 回复

indicator-color

indicator-active-color

在swiper里面写就可以

应该这样子。。。

<view class=“wrap”>

    <swiper indicator-color="{{color}}" indicator-active-color="{{active}}" indicator-dots="{{dots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" class=“cover”>

        <block wx:for="{{img}}" wx:key=“img”>

            <swiper-item>

                <image src="{{item}}" class=“cover”></image>

            </swiper-item>

        </block>

    </swiper>

</view>

data:{

      img:[

        ‘http://y.gtimg.cn/music/photo_new/T003R720x288M000000rVobR3xG73f.jpg’,

        ‘http://y.gtimg.cn/music/photo_new/T003R720x288M000000j6Tax0WLWhD.jpg’,

        ‘http://y.gtimg.cn/music/photo_new/T003R720x288M000000a4LLK2VXxvj.jpg’,

      ],

      dots: true,

      color: ‘rgba(0,0,0,.3)’,

      active: ‘#2caf6f’,

      autoplay: true,

      interval: 3000,

      duration: 1000,

  },

设置了没起作用,是这么写么?

swiper的indicator-color和indicator-active-color设置不起作用了吗

回到顶部