diff --git a/docs/zh-CN/components/form/input-tree.md b/docs/zh-CN/components/form/input-tree.md index 234919ebb..a55b7d7e6 100755 --- a/docs/zh-CN/components/form/input-tree.md +++ b/docs/zh-CN/components/form/input-tree.md @@ -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 | - | 重置数据 | \ No newline at end of file +| reset | - | 重置数据 | diff --git a/src/renderers/Form/TreeSelect.tsx b/src/renderers/Form/TreeSelect.tsx index b703e67c3..7830201eb 100644 --- a/src/renderers/Form/TreeSelect.tsx +++ b/src/renderers/Form/TreeSelect.tsx @@ -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