Select 样式优化

This commit is contained in:
liaoxuezhi 2019-11-11 19:59:22 +08:00
parent 4302ce2325
commit c16f4f0c20
3 changed files with 9 additions and 4 deletions

View File

@ -33,8 +33,7 @@
position: relative; position: relative;
flex-grow: 1; flex-grow: 1;
line-height: 1; line-height: 1;
max-width: 100%; width: 0; // ! 没有这个会撑开
overflow: hidden;
} }
&-placeholder { &-placeholder {
@ -48,6 +47,9 @@
&-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%;
overflow: hidden;
text-overflow: ellipsis;
} }
@ -292,6 +294,7 @@
.#{$ns}Form-control--sizeMd>.#{$ns}Select, .#{$ns}Form-control--sizeMd>.#{$ns}Select,
.#{$ns}Form-control--sizeLg>.#{$ns}Select { .#{$ns}Form-control--sizeLg>.#{$ns}Select {
min-width: 100%; min-width: 100%;
max-width: 100%;
display: inline-flex !important; display: inline-flex !important;
} }
} }

View File

@ -59,7 +59,8 @@ export default class Dialog extends React.Component<DialogProps, DialogState> {
'show', 'show',
'body', 'body',
'showCloseButton', 'showCloseButton',
'actions' 'actions',
'popOverContainer'
]; ];
static defaultProps: Partial<DialogProps> = { static defaultProps: Partial<DialogProps> = {
title: '弹框', title: '弹框',

View File

@ -55,7 +55,8 @@ export default class Drawer extends React.Component<DrawerProps, object> {
'show', 'show',
'resizable', 'resizable',
'overlay', 'overlay',
'body' 'body',
'popOverContainer'
]; ];
static defaultProps: Partial<DrawerProps> = { static defaultProps: Partial<DrawerProps> = {
title: '', title: '',