mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-01 17:00:21 +08:00
fix: 修复 SelectItem 下拉菜单悬停高亮效果
将 hover:bg-primary/10 改为 data-[highlighted]:bg-accent,与 DropdownMenuItem 保持一致。radix-vue 使用 data-highlighted 属性 控制高亮状态,这样键盘导航和鼠标悬停的高亮行为才能正确同步。
This commit is contained in:
@@ -14,7 +14,9 @@ const props = defineProps<Props>()
|
||||
|
||||
const itemClass = computed(() =>
|
||||
cn(
|
||||
'relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-primary/10 focus:bg-primary/15 text-foreground transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
||||
'relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none',
|
||||
'data-[highlighted]:bg-accent focus:bg-accent text-foreground',
|
||||
'transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
||||
props.class
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user