Skip to content

Commit

Permalink
feat(BasicTree): BasicTree组件暴露treeData数据
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjue666 committed Nov 9, 2023
1 parent 2142506 commit caf1783
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/Tree/src/BasicTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@
});
const instance: TreeActionType = {
treeData: treeDataRef,
setExpandedKeys,
getExpandedKeys,
setSelectedKeys,
Expand Down
3 changes: 2 additions & 1 deletion src/components/Tree/src/types/tree.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -171,6 +171,7 @@ export interface InsertNodeParams {
}

export interface TreeActionType {
treeData: Ref<TreeDataItem[]>;
checkAll: (checkAll: boolean) => void;
expandAll: (expandAll: boolean) => void;
setExpandedKeys: (keys: KeyType[]) => void;
Expand Down

0 comments on commit caf1783

Please sign in to comment.