feat:级联组件支持边框设置 (#2490)

Co-authored-by: qinhaoyan <qinhaoyan@baidu.com>
This commit is contained in:
qinhaoyan 2021-09-01 21:15:34 +08:00 committed by GitHub
parent 20b4aa4145
commit a64041efbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View File

@ -1,6 +1,6 @@
.#{$ns}NestedSelect {
position: relative;
@include input-border();
&-optionArrowRight {
display: inline-block;
padding-right: px2rem(10px);

View File

@ -10,7 +10,8 @@ import {
filterTree,
string2regExp,
getTreeAncestors,
getTreeParent
getTreeParent,
ucFirst
} from '../../utils/helper';
import {
FormOptionsControl,
@ -29,6 +30,10 @@ import union from 'lodash/union';
*/
export interface NestedSelectControlSchema extends FormOptionsControl {
type: 'nested-select';
/**
*
*/
borderMode?: 'full' | 'half' | 'none';
}
export interface NestedSelectProps extends OptionsControlProps {
@ -556,7 +561,8 @@ export default class NestedSelectControl extends React.Component<
autoComplete,
selectedOptions,
clearable,
loading
loading,
borderMode
} = this.props;
return (
@ -571,7 +577,8 @@ export default class NestedSelectControl extends React.Component<
'NestedSelect--multi': multiple,
'NestedSelect--searchable': searchable,
'is-opened': this.state.isOpened,
'is-focused': this.state.isFocused
'is-focused': this.state.isFocused,
[`NestedSelect--border${ucFirst(borderMode)}`]: borderMode,
})}
result={
multiple