2021-11-10 02:06:59 +00:00
|
|
|
import type { App } from 'vue';
|
|
|
|
import { defineComponent } from 'vue';
|
2019-01-12 03:33:27 +00:00
|
|
|
import Tree from './Tree';
|
2021-11-26 14:34:27 +00:00
|
|
|
import { TreeNode as VcTreeNode } from '../vc-tree';
|
2019-01-12 03:33:27 +00:00
|
|
|
import DirectoryTree from './DirectoryTree';
|
2021-11-26 14:34:27 +00:00
|
|
|
import { treeNodeProps } from '../vc-tree/props';
|
2018-04-13 10:58:58 +00:00
|
|
|
|
2021-09-25 08:51:32 +00:00
|
|
|
export type { EventDataNode, DataNode } from '../vc-tree/interface';
|
|
|
|
|
|
|
|
export type {
|
|
|
|
TreeProps,
|
|
|
|
AntTreeNodeMouseEvent,
|
|
|
|
AntTreeNodeExpandedEvent,
|
|
|
|
AntTreeNodeCheckedEvent,
|
|
|
|
AntTreeNodeSelectedEvent,
|
|
|
|
AntTreeNodeDragEnterEvent,
|
|
|
|
AntTreeNodeDropEvent,
|
|
|
|
AntdTreeNodeAttribute,
|
|
|
|
TreeDataItem,
|
|
|
|
} from './Tree';
|
|
|
|
|
|
|
|
export type {
|
|
|
|
ExpandAction as DirectoryTreeExpandAction,
|
|
|
|
DirectoryTreeProps,
|
|
|
|
} from './DirectoryTree';
|
|
|
|
|
2018-09-19 05:21:57 +00:00
|
|
|
/* istanbul ignore next */
|
|
|
|
|
2021-11-26 14:34:27 +00:00
|
|
|
const TreeNode = defineComponent({ ...VcTreeNode, name: 'ATreeNode', props: treeNodeProps });
|
2021-11-10 02:06:59 +00:00
|
|
|
|
|
|
|
export { DirectoryTree, TreeNode };
|
|
|
|
|
|
|
|
export default Object.assign(Tree, {
|
|
|
|
DirectoryTree,
|
|
|
|
TreeNode,
|
|
|
|
install: (app: App) => {
|
|
|
|
app.component(Tree.name, Tree);
|
|
|
|
app.component(TreeNode.name, TreeNode);
|
|
|
|
app.component(DirectoryTree.name, DirectoryTree);
|
|
|
|
return app;
|
|
|
|
},
|
|
|
|
});
|