Skip to content

Commit 3b18309

Browse files
authored
fix(select): add max-height:50% for select-dropdown (#3978)
* fix(select): add max-height:50% for select-dropdown * fix(theme-saas): add losted less vars define
1 parent 4ab770d commit 3b18309

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

packages/renderless/src/select/vue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,11 @@ const initState = ({
295295
rootAutoTipConfig: computed(() => ({
296296
content: state.displayOnlyContent,
297297
always: !!state.displayOnlyContent,
298+
popperClass: 'tiny-select__popper-maxh-50',
298299
...props.tooltipConfig
299300
})),
300301
ariaListId: 'tiny-select-' + crypto.randomUUID().slice(-8)
301302
})
302-
303303
return state
304304
}
305305

packages/theme-saas/src/select-dropdown/index.less

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@import '../custom.less';
22

33
@select-dropdown-prefix-cls: ~'@{css-prefix}select-dropdown';
4+
@select-prefix-cls: ~'@{css-prefix}select';
45
@input-prefix-cls: ~'@{css-prefix}input';
56
@tree-prefix-cls: ~'@{css-prefix}tree';
67
@popper-prefix-cls: ~'@{css-prefix}popper';
@@ -41,7 +42,7 @@
4142
list-style: none;
4243

4344
.@{select-dropdown__item-prefix-cls} {
44-
margin-right: 0
45+
margin-right: 0;
4546
}
4647

4748
&__slot {
@@ -89,8 +90,8 @@
8990
@apply m-1;
9091
@apply rounded;
9192

92-
>.tiny-svg,
93-
>span>.tiny-svg {
93+
> .tiny-svg,
94+
> span > .tiny-svg {
9495
@apply ~'-mt-0.5';
9596
}
9697
}
@@ -99,7 +100,7 @@
99100
@apply text-center;
100101
@apply ~'py-2.5 px-0';
101102

102-
>.circular {
103+
> .circular {
103104
@apply fill-color-brand;
104105
@apply h-4;
105106
@apply w-4;
@@ -144,6 +145,10 @@
144145
}
145146
}
146147

148+
.@{select-prefix-cls}__popper-maxh-50 {
149+
max-height: 50%;
150+
}
151+
147152
@keyframes loading-rotate {
148153
100% {
149154
transform: rotate(360deg);
@@ -165,4 +170,4 @@
165170
stroke-dasharray: 90, 150;
166171
stroke-dashoffset: -120px;
167172
}
168-
}
173+
}

packages/theme/src/select-dropdown/index.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,3 +195,7 @@
195195
background: var(--tv-SelectDropdown-empty-img) 50% no-repeat;
196196
}
197197
}
198+
199+
.@{select-prefix-cls}__popper-maxh-50 {
200+
max-height: 50%;
201+
}

0 commit comments

Comments
 (0)