From caf178352537650f603aca441386b377f7cf8821 Mon Sep 17 00:00:00 2001 From: invalid w Date: Thu, 9 Nov 2023 09:47:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(BasicTree):=20BasicTree=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=9A=B4=E9=9C=B2treeData=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Tree/src/BasicTree.vue | 1 + src/components/Tree/src/types/tree.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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;