fix: type为 tree-select时,无showOutline属性配置 (#4097)

Co-authored-by: ”jiatianqi“ <”jiatianqi@baidu.com“>
This commit is contained in:
Ma ke 2022-04-20 18:19:51 +08:00 committed by GitHub
parent 4fe7b41f7a
commit 5574675878
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -907,6 +907,7 @@ true false true [{label: 'A/B/C', value: 'a/b/c'},{label: 'A
| rootLabel | `boolean` | `"顶级"` | 当 `hideRoot` 不为 `false` 时有用,用来设置顶级节点的文字。 |
| showIcon | `boolean` | `true` | 是否显示图标 |
| showRadio | `boolean` | `false` | 是否显示单选按钮,`multiple` 为 `false` 是有效。 |
| showOutline | `boolean` | `false` | 是否显示树层级展开线 |
| initiallyOpen | `boolean` | `true` | 设置是否默认展开所有层级。 |
| unfoldedLevel | `number` | `0` | 设置默认展开的级数,只有`initiallyOpen`不是`true`时生效。 |
| autoCheckChildren | `boolean` | `true` | 当选中父节点时级联选择子节点。 |
@ -940,4 +941,4 @@ true false true [{label: 'A/B/C', value: 'a/b/c'},{label: 'A
| expand | openLevel: `number` | 配置展开层级 |
| collapse | - | 关闭树|
| clear | - | 清除数据 |
| reset | - | 重置数据 |
| reset | - | 重置数据 |

View File

@ -94,6 +94,11 @@ export interface TreeSelectControlSchema extends FormOptionsControl {
*
*/
pathSeparator?: string;
/**
* 线
*/
showOutline?: boolean;
}
export interface TreeSelectProps extends OptionsControlProps {
@ -536,7 +541,8 @@ export default class TreeSelectControl extends React.Component<
translate: __,
deferLoad,
expandTreeOptions,
selfDisabledAffectChildren
selfDisabledAffectChildren,
showOutline
} = this.props;
let filtedOptions =
@ -568,6 +574,7 @@ export default class TreeSelectControl extends React.Component<
rootValue={rootValue}
showIcon={showIcon}
showRadio={showRadio}
showOutline={showOutline}
cascade={cascade}
foldedField="collapsed"
hideRoot