Skip to content

Commit fa8e973

Browse files
committed
feat (core): 美化 Select 组件
1 parent bc1304d commit fa8e973

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

.github/workflows/docs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Publish docs via GitHub Pages
22

33
on:
4-
push:
54
pull_request:
65
types: [closed]
76
workflow_dispatch:

src/ui/Select.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@
1010
@keydown.arrow-down.prevent="openDropdown"
1111
@keydown.arrow-up.prevent="openDropdown"
1212
:class="[
13-
'relative w-full cursor-pointer rounded-lg border bg-white px-4 py-2 pr-10 text-left transition-all duration-200 ring-1 ring-blue-200',
14-
disabled ? 'cursor-not-allowed bg-gray-50 text-gray-400' : 'hover:border-gray-400',
13+
'relative w-full cursor-pointer rounded-lg border bg-white px-4 py-2 pr-10 text-left transition-all duration-200',
14+
// 根据状态动态应用边框样式
15+
isOpen && !disabled
16+
? 'border-blue-400 ring-blue-200' // 打开时显示蓝色
17+
: disabled
18+
? 'border-gray-300 ring-0 cursor-not-allowed bg-gray-50 text-gray-400' // 禁用状态
19+
: 'border-gray-300 ring-0 hover:border-blue-400 hover:ring-blue-200', // 默认和悬停状态
1520
...buttonClasses
1621
]"
1722
:disabled="disabled"
1823
:aria-expanded="isOpen"
1924
:aria-haspopup="true"
20-
:style="{
21-
border: 'none !important',
22-
outline: 'none !important',
23-
boxShadow: '0 0 0 1px rgb(147 197 253)'
24-
}"
2525
role="combobox">
2626
<span class="block truncate">
2727
{{ selectedLabel || placeholder }}

0 commit comments

Comments
 (0)