zhangyong
2023-08-22 1353e87cb21a4032d585d7404bae9042f2ebcf08
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import type { ComponentInternalInstance, ExtractPropTypes, SetupContext } from 'vue';
import type { treeEmits, treeProps } from './virtual-tree';
export declare type TreeNodeData = Record<string, any>;
export declare type TreeData = TreeNodeData[];
export declare type TreeKey = string | number;
export interface TreeOptionProps {
    children?: string;
    label?: string;
    value?: string;
    disabled?: string;
}
export declare type TreeProps = ExtractPropTypes<typeof treeProps>;
export interface TreeNode {
    key: TreeKey;
    level: number;
    parent?: TreeNode;
    children?: TreeNode[];
    data: TreeNodeData;
    disabled?: boolean;
    label?: string;
    isLeaf?: boolean;
}
export interface TreeContext {
    ctx: Omit<SetupContext<typeof treeEmits>, 'expose' | 'attrs'>;
    instance: ComponentInternalInstance;
    props: TreeProps;
}
export interface Tree {
    treeNodeMap: Map<TreeKey, TreeNode>;
    levelTreeNodeMap: Map<number, TreeNode[]>;
    treeNodes: TreeNode[];
    maxLevel: number;
}
export declare type FilterMethod = (query: string, node: TreeNodeData) => boolean;
export interface CheckedInfo {
    checkedKeys: TreeKey[];
    checkedNodes: TreeData;
    halfCheckedKeys: TreeKey[];
    halfCheckedNodes: TreeData;
}