Closed fython closed 4 months ago
1.9.3
https://stackblitz.com/edit/gwtw5e?file=src%2Fdemo.vue
disabled: true
value/v-model
被禁用的选项背景保持透明/背景色,而非高亮色。
Nice to have: 其他已勾选但未禁用的项的背景也保持透明/背景色,仅在 hover/activated 状态下展示背景色
被禁用的选项背景是高亮色,仅勾选图标灰色显示禁用,体验不好
No response
从 DevTools 上看,.t-select-option.t-is-disabled 样式有单独定义,但是优先级低于 .t-select-option.t-is-selected,导致字体颜色/背景色都被选中状态样式覆盖了
.t-select-option.t-is-disabled
.t-select-option.t-is-selected
业界其他组件/UI 的下拉列表选项仅在 hover/activated 状态下显示高亮背景色,而非全部 Checked 项都显示
👋 @fython,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
fixed 1.9.4, thanks for @fython
tdesign-vue 版本
1.9.3
重现链接
https://stackblitz.com/edit/gwtw5e?file=src%2Fdemo.vue
重现步骤
disabled: true
的选项value/v-model
中期望结果
被禁用的选项背景保持透明/背景色,而非高亮色。
Nice to have: 其他已勾选但未禁用的项的背景也保持透明/背景色,仅在 hover/activated 状态下展示背景色
实际结果
被禁用的选项背景是高亮色,仅勾选图标灰色显示禁用,体验不好
框架版本
No response
浏览器版本
No response
系统版本
No response
Node版本
No response
补充说明
问题分析
从 DevTools 上看,
.t-select-option.t-is-disabled
样式有单独定义,但是优先级低于.t-select-option.t-is-selected
,导致字体颜色/背景色都被选中状态样式覆盖了对比案例
业界其他组件/UI 的下拉列表选项仅在 hover/activated 状态下显示高亮背景色,而非全部 Checked 项都显示
Element UI
View Design (iView UI)