From c16f4f0c205e9c5165471d7cf7feb2088a56917e Mon Sep 17 00:00:00 2001 From: liaoxuezhi Date: Mon, 11 Nov 2019 19:59:22 +0800 Subject: [PATCH] =?UTF-8?q?Select=20=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scss/components/form/_select.scss | 7 +++++-- src/renderers/Dialog.tsx | 3 ++- src/renderers/Drawer.tsx | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/scss/components/form/_select.scss b/scss/components/form/_select.scss index 34d346362..331a264a2 100644 --- a/scss/components/form/_select.scss +++ b/scss/components/form/_select.scss @@ -33,8 +33,7 @@ position: relative; flex-grow: 1; line-height: 1; - max-width: 100%; - overflow: hidden; + width: 0; // ! 没有这个会撑开。 } &-placeholder { @@ -48,6 +47,9 @@ &-value { line-height: $Form-input-lineHeight * $Form-input-fontSize; white-space: nowrap; + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; } @@ -292,6 +294,7 @@ .#{$ns}Form-control--sizeMd>.#{$ns}Select, .#{$ns}Form-control--sizeLg>.#{$ns}Select { min-width: 100%; + max-width: 100%; display: inline-flex !important; } } \ No newline at end of file diff --git a/src/renderers/Dialog.tsx b/src/renderers/Dialog.tsx index 1ba7d6d0a..9932d1fd5 100644 --- a/src/renderers/Dialog.tsx +++ b/src/renderers/Dialog.tsx @@ -59,7 +59,8 @@ export default class Dialog extends React.Component { 'show', 'body', 'showCloseButton', - 'actions' + 'actions', + 'popOverContainer' ]; static defaultProps: Partial = { title: '弹框', diff --git a/src/renderers/Drawer.tsx b/src/renderers/Drawer.tsx index a4e6e1fe7..b43e52b9a 100644 --- a/src/renderers/Drawer.tsx +++ b/src/renderers/Drawer.tsx @@ -55,7 +55,8 @@ export default class Drawer extends React.Component { 'show', 'resizable', 'overlay', - 'body' + 'body', + 'popOverContainer' ]; static defaultProps: Partial = { title: '',