diff --git a/src/tree-select/tree-select.tsx b/src/tree-select/tree-select.tsx index ab0ef06d1..d90528c8b 100644 --- a/src/tree-select/tree-select.tsx +++ b/src/tree-select/tree-select.tsx @@ -104,7 +104,7 @@ export default defineComponent({ onLoad: this.treeNodeLoad, onChange: this.treeNodeChange, onActive: this.treeNodeActive, - expandOnClickNode: true, + expandOnClickNode: false, empty: () => this.renderDefaultTNode('empty', { defaultNode:
{this.global.empty}
, }), diff --git a/src/tree/hooks/useRenderLabel.tsx b/src/tree/hooks/useRenderLabel.tsx index 3efff0365..c765411d0 100644 --- a/src/tree/hooks/useRenderLabel.tsx +++ b/src/tree/hooks/useRenderLabel.tsx @@ -72,7 +72,7 @@ export default function useRenderLabel(state: TypeTreeItemState) { name={String(node.value)} onChange={handleChange} stopLabelTrigger={shouldStopLabelTrigger.value} - ignore="expand,active" + ignore={treeProps.expandOnClickNode ? 'active' : 'expand,active'} props={itemCheckProps} > {labelNode}