Select 样式调整,支持超出换行

This commit is contained in:
liaoxuezhi 2019-12-16 10:56:07 +08:00
parent 38a9f013e9
commit 1fde578ba5
1 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,7 @@
border: $Form-select-borderWidth solid $Form-select-borderColor; border: $Form-select-borderWidth solid $Form-select-borderColor;
background: $Form-select-bg; background: $Form-select-bg;
border-radius: $Form-select-borderRadius; border-radius: $Form-select-borderRadius;
height: $Form-selectOption-height; min-height: $Form-selectOption-height;
$paddingY: ( $paddingY: (
$Form-selectOption-height - $Form-input-lineHeight * $Form-input-fontSize - $Form-selectOption-height - $Form-input-lineHeight * $Form-input-fontSize -
$Form-select-borderWidth * 2 $Form-select-borderWidth * 2
@ -36,6 +36,7 @@
position: relative; position: relative;
flex-grow: 1; flex-grow: 1;
line-height: 1; line-height: 1;
width: 0;
} }
&-placeholder { &-placeholder {
@ -46,7 +47,7 @@
&-value { &-value {
line-height: $Form-input-lineHeight * $Form-input-fontSize; line-height: $Form-input-lineHeight * $Form-input-fontSize;
white-space: nowrap; // white-space: nowrap;
max-width: 100%; max-width: 100%;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;