Browse Source

feat(BasicTree): BasicTree组件暴露treeData数据

pull/3264/head
invalid w 3 years ago
parent
commit
caf1783525
  1. 1
      src/components/Tree/src/BasicTree.vue
  2. 3
      src/components/Tree/src/types/tree.ts

1
src/components/Tree/src/BasicTree.vue

@ -320,6 +320,7 @@
});
const instance: TreeActionType = {
treeData: treeDataRef,
setExpandedKeys,
getExpandedKeys,
setSelectedKeys,

3
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<TreeDataItem[]>;
checkAll: (checkAll: boolean) => void;
expandAll: (expandAll: boolean) => void;
setExpandedKeys: (keys: KeyType[]) => void;

Loading…
Cancel
Save