swiper组件 indicator-color赋值

发布于 7 年前作者 xuefang1541 次浏览最后编辑 7 年前来自 ask

 indicator-color 赋值类型Color   默认rgba(0, 0, 0, .3)

如果我要修改这个值 怎么赋值 直接写 

第一种:

 indicator-color=“rgba(125, 125, 125, .3)” 编译调试 rgba 没定义

第二种:

 indicator-color=“#1afa29”  编译调试无效果


第三种:

 indicator-color=0x1afa29 编译调试无效果


Color 类型如何定义

5 回复
duanyong
duanyong1 楼6 年前

抱歉,这个属性的版本即将发布,已在文档上注明了。

chao09
chao092 楼6 年前

不管用 等修复吧 不过有另外一种解决办法 ,就是自定义indicator用定位显示在 swiper上面  然后在bindchange里面实时获取current值 根据这个值改变样式  

daixia
daixia3 楼6 年前

视图层:

<swiper vertical=“{{vertical}}” indicator-color=“{{indicatorColor}}” circular=“{{circular}}” indicator-dots=“{{indicatorDots}}”

  autoplay=“{{autoplay}}” interval=“{{interval}}” duration=“{{duration}}”>

indicator-color 转换为 indicatorColor 就可以了

jiangfang
jiangfang4 楼6 年前

谢谢各位 解答

echen
echen5 楼5 年前

我也都试过,indicator-color设置都无效,同求解答