Merge pull request #557 from RickCole21/master

修复nested-select样式
This commit is contained in:
liaoxuezhi 2020-04-20 21:40:21 +08:00 committed by GitHub
commit 9ccd9e62dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -95,8 +95,7 @@
}
&-menu {
width: 160px;
max-width: 160px;
min-width: px2rem(160px);
max-height: px2rem(300px);
background: $Form-select-menu-bg;
color: $Form-select-menu-color;
@ -113,7 +112,7 @@
.#{$ns}NestedSelect-option {
position: relative;
padding-left: px2rem(10px);
height: $Form-input-height;
min-height: $Form-input-height;
line-height: $Form-input-height;
cursor: pointer;
display: flex;

View File

@ -361,7 +361,11 @@ export default class NestedSelectControl extends React.Component<
return (
<>
{stack.map((options, index) => (
<div key={index} className={cx('NestedSelect-menu')}>
<div
key={index}
className={cx('NestedSelect-menu')}
style={{minWidth: this.target.offsetWidth}}
>
{index === 0 ? searchInput : null}
{multiple && index === 0 ? (
<div className={cx('NestedSelect-option', 'checkall')}>