diff --git a/scss/components/form/_nested-select.scss b/scss/components/form/_nested-select.scss index 339d8a64..af76ea4e 100644 --- a/scss/components/form/_nested-select.scss +++ b/scss/components/form/_nested-select.scss @@ -109,7 +109,7 @@ } &-menu { - min-width: px2rem(160px); + min-width: px2rem(120px); max-height: px2rem(300px); background: $Form-select-menu-bg; color: $Form-select-menu-color; @@ -161,3 +161,19 @@ } } } + +// 需要能撑开 +@include media-breakpoint-up(sm) { + .#{$ns}Form-control--sizeXs > .#{$ns}NestedSelect, + .#{$ns}Form-control--sizeSm > .#{$ns}NestedSelect, + .#{$ns}Form-control--sizeMd > .#{$ns}NestedSelect, + .#{$ns}Form-control--sizeLg > .#{$ns}NestedSelect { + min-width: 100%; + max-width: 100%; + display: inline-flex !important; + + .#{$ns}Select-valueWrap { + width: 0; // ! 没有这个会撑开。 + } + } +} diff --git a/src/renderers/Form/NestedSelect.tsx b/src/renderers/Form/NestedSelect.tsx index be6cd86e..5e543dad 100644 --- a/src/renderers/Form/NestedSelect.tsx +++ b/src/renderers/Form/NestedSelect.tsx @@ -521,7 +521,7 @@ export default class NestedSelectControl extends React.Component< >