Tencent / tdesign-vue

A Vue.js UI components lib for TDesign.
https://tdesign.tencent.com/vue
MIT License
908 stars 351 forks source link

[Select] multiple 多选模式下拉列表中 Checked 项样式问题 #3168

Closed fython closed 4 months ago

fython commented 4 months ago

tdesign-vue 版本

1.9.3

重现链接

https://stackblitz.com/edit/gwtw5e?file=src%2Fdemo.vue

重现步骤

  1. Select 组件 options 参数包含 disabled: true 的选项
  2. 被禁用的选项 value 存在于 Select 组件的 value/v-model
  3. 打开下拉列表

期望结果

被禁用的选项背景保持透明/背景色,而非高亮色。

Nice to have: 其他已勾选但未禁用的项的背景也保持透明/背景色,仅在 hover/activated 状态下展示背景色

实际结果

被禁用的选项背景是高亮色,仅勾选图标灰色显示禁用,体验不好

image

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

问题分析

image

从 DevTools 上看,.t-select-option.t-is-disabled 样式有单独定义,但是优先级低于 .t-select-option.t-is-selected,导致字体颜色/背景色都被选中状态样式覆盖了

对比案例

业界其他组件/UI 的下拉列表选项仅在 hover/activated 状态下显示高亮背景色,而非全部 Checked 项都显示

Element UI

image

View Design (iView UI)

image
github-actions[bot] commented 4 months ago

👋 @fython,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

uyarn commented 4 months ago

fixed 1.9.4, thanks for @fython