Skip to content

Commit 5837c12

Browse files
committed
fix:修复暗色主题下datePicker删除图标显示
1 parent cd468ac commit 5837c12

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

packages/theme/src/picker/index.less

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@
3030
display: inline-block;
3131
text-align: left;
3232

33+
&:hover,
34+
&:focus {
35+
.tiny-svg-custom {
36+
visibility: hidden;
37+
}
38+
}
39+
3340
.tiny-svg {
3441
font-size: var(--tv-Picker-icon-size);
3542
fill: var(--tv-Picker-icon-color);
@@ -51,7 +58,6 @@
5158
}
5259

5360
&.show-auto-width {
54-
5561
&.@{input-prefix-cls},
5662
&.@{input-prefix-cls}__inner {
5763
width: 100%;
@@ -76,7 +82,6 @@
7682

7783
.baseClearicon {
7884
position: absolute;
79-
background-color: var(--tv-Picker-input-clear-icon-bg);
8085

8186
&:hover {
8287
fill: var(--tv-Picker-icon-color-hover);
@@ -130,7 +135,7 @@
130135
}
131136
}
132137

133-
.@{range-prefix-cls}__close-icon:has(> svg)+.@{range-prefix-cls}__icon {
138+
.@{range-prefix-cls}__close-icon:has(> svg) + .@{range-prefix-cls}__icon {
134139
display: none;
135140
}
136141
}
@@ -310,4 +315,4 @@
310315
}
311316
}
312317
}
313-
}
318+
}

packages/vue/src/picker/src/pc.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
</template>
5151
<template #suffix>
5252
<i class="tiny-input__icon-container">
53-
<transition name="tiny-transition-icon-scale-in">
53+
<div name="tiny-transition-icon-scale-in">
5454
<component
5555
:is="state.showClose ? clearIcon : null"
5656
@click="handleClickIcon"
@@ -59,8 +59,13 @@
5959
v-if="state.haveTrigger"
6060
class="baseClearicon"
6161
/>
62-
</transition>
63-
<component :is="state.triggerClass" @click="handleFocus" class="tiny-svg-size" />
62+
</div>
63+
<component
64+
:is="state.triggerClass"
65+
@click="handleFocus"
66+
:class="state.displayValue ? 'tiny-svg-custom' : ''"
67+
class="tiny-svg-size"
68+
/>
6469
</i>
6570
</template>
6671
</tiny-input>

0 commit comments

Comments
 (0)