layui/.svn/pristine/26/2670eddc9efe346ac89cc7e04dc5e60a26913931.svn-base
2022-12-09 16:41:41 +08:00

36 lines
1.1 KiB
Plaintext

export declare type StringFn = () => string;
export declare type StringOrNumber = string | number;
export declare type KeysType = (number | string)[];
export declare type EditType = boolean | ("add" | "update" | "delete");
export interface OriginalTreeData {
title: StringFn | string;
id: StringOrNumber;
field: StringFn | string;
children?: OriginalTreeData[];
disabled?: boolean;
}
export interface ReplaceFieldsOptions {
id?: string;
children?: string;
title?: string;
}
export interface TreeProps {
checkedKeys?: KeysType;
expandKeys?: KeysType;
data: OriginalTreeData;
checkStrictly?: boolean | string;
showCheckbox?: boolean;
edit?: EditType;
collapseTransition?: boolean;
onlyIconControl?: boolean;
showLine?: boolean;
replaceFields?: ReplaceFieldsOptions;
}
export interface TreeEmits {
(e: "update:checkedKeys", keys: KeysType): void;
(e: "update:expandKeys", keys: KeysType): void;
(e: "node-click", node: OriginalTreeData, event: Event): void;
}
export declare type CustomKey = string | number;
export declare type CustomString = (() => string) | string;