ant-design-vue
ant-design-vue copied to clipboard
统一数据选中项的 color 属性的自定义能力
- [ ] I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
主要的价值点在于操作提效上。
这里主要有话 TimePicker 和 Cascader 组件,这两个个组件都属于时间选择组件(在众多选项中选择某一项)。比如 TimePicker 组件,点击展开选项,选中项的背景色会发生变化,比如默认是 灰色,并且官方支持自定义该背景色,但是文字颜色却不支持,其中 TimePicker 和 Cascader 组件都没有提供设置选中项文字颜色的主题变量,这两个组件选项中的文字,不论是选中还是未选中亦或者悬停状态下,都是黑色。
如果支持自定义文字的颜色,这样就可以保持文字和背景色色调的一致,更能突出选项的属性,已选/悬停项区分的很明确,选择时也能更快聚焦到想看的信息上,选项越多,这种优势越明显。
Menu 和 Select 组件就是一个符合预期的状态,为用户提供了对应的主题变量,给了用户自定义的机会。
What does the proposed API look like?
期望可以给 TimePicker 和 Cascader 组件,增加选中项文字颜色主题变量,给用户提供自定义的机会。
对比效果图

如果同意,我这边可以提交 pr,望回复、讨论。
对于样式,我们会定期同步 antd,如果新增了antd没有的特性,后续无法同步,建议你先给 antd 提交pr
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.