diff --git a/src/components/Tree/src/BasicTree.vue b/src/components/Tree/src/BasicTree.vue index 46373d2ce..493340e5c 100644 --- a/src/components/Tree/src/BasicTree.vue +++ b/src/components/Tree/src/BasicTree.vue @@ -320,6 +320,7 @@ }); const instance: TreeActionType = { + treeData: treeDataRef, setExpandedKeys, getExpandedKeys, setSelectedKeys, diff --git a/src/components/Tree/src/types/tree.ts b/src/components/Tree/src/types/tree.ts index 53f5b5eea..e7c0d573a 100644 --- a/src/components/Tree/src/types/tree.ts +++ b/src/components/Tree/src/types/tree.ts @@ -1,4 +1,4 @@ -import type { ExtractPropTypes } from 'vue'; +import type { ExtractPropTypes, Ref } from 'vue'; import type { TreeDataItem } from 'ant-design-vue/es/tree/Tree'; import { buildProps } from '/@/utils/props'; @@ -171,6 +171,7 @@ export interface InsertNodeParams { } export interface TreeActionType { + treeData: Ref; checkAll: (checkAll: boolean) => void; expandAll: (expandAll: boolean) => void; setExpandedKeys: (keys: KeyType[]) => void;