diff --git a/src/components/Tree/src/BasicTree.vue b/src/components/Tree/src/BasicTree.vue index 2d23abfe..fec28a27 100644 --- a/src/components/Tree/src/BasicTree.vue +++ b/src/components/Tree/src/BasicTree.vue @@ -297,6 +297,7 @@ export default defineComponent({ }) 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 8234918e..0008be88 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' @@ -165,6 +165,7 @@ export interface InsertNodeParams { } export interface TreeActionType { + treeData: Ref checkAll: (checkAll: boolean) => void expandAll: (expandAll: boolean) => void setExpandedKeys: (keys: KeyType[]) => void