@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
51 lines (50 loc) • 1.37 kB
TypeScript
import { Ref } from 'vue';
export type TargetType = 'menu' | 'app';
export interface TreeNode {
id: string;
parentId?: string;
code?: string;
name?: string;
hasChildren?: boolean;
layer?: number;
collapse?: boolean;
[key: string]: any;
}
export type FetchNodeApi = string | ((expandedNode?: TreeNode) => string);
export interface UseTreeDataLoader {
treeData: Ref<TreeNode[]>;
loadNodesByLevel(node?: TreeNode): void;
getLeafDescendants(node: TreeNode): any[];
clearCache(): void;
}
export interface UseTreeGridCoordinator {
treeData: Ref<TreeNode[]>;
gridData: Ref<any[]>;
selectedData: Ref<any>;
onNavTreeSelectionChange: (selectedItems: TreeNode[]) => void;
onNavTreeExpandNode: (eventParam: any) => void;
onDataGridSelectionChange: (selectedItems: any[]) => void;
onDataGridUnSelectItem: (eventParam: any) => void;
initialize(): void;
clearCache(): void;
}
export interface MenuTreeNode extends TreeNode {
funcType: FunctionType;
sortOrder: number;
}
export interface AppTreeNode extends TreeNode {
appInvoks?: AppInvokeInfo[];
}
export declare enum FunctionType {
KeyApp = "1",
Module = "2",
MenuGroup = "3",
Menu = "4"
}
export interface AppInvokeInfo {
id: string;
code: string;
name: string;
appId: string;
appEntrance: string;
}