2***@qq.com
2***@qq.com
  • 发布:2022-10-31 16:31
  • 更新:2024-03-13 17:27
  • 阅读:504

uni-segmented-control建议增加 inActiveColor属性

分类:uni-app
如果这个控件加了背景色,默认的黑色显示起来会有问题,希望能增加不活跃标签的颜色属性 目前我是直接改了这个控件,但是每次都要改,希望官方下一个版本能加上 <view> <text :style="{color: index === currentIndex ? styleType === 'text' ? activeColor '#fff' styleType === 'text' ? inActiveColor activeColor}" class="segmented-controltext" :class="styleType === 'text' && index === currentIndex ? 'segmented-controlitem--text': ''">{{ item }}</text> </view>
  • props: {
    current: {
    type: Number,
    default: 0
    },
    values: {
    type: Array,
    default () {
    return []
    }
    },
    activeColor: {
    type: String,
    default: '#2979FF'
    },
    inActiveColor: {
    type: String,
    default: '#000'
    },
    styleType: {
    type: String,
    default: 'button'
    }
    },

谢谢

2022-10-31 16:31 负责人:无 分享
已邀请:

最佳回复

HRK_01

HRK_01

感谢反馈,已增加该属性:inActive,待后续合并代码后发布新版本会同步在文档里

4***@qq.com

4***@qq.com

?????

要回复问题请先登录注册