✨(component): 升级 vue 3.2.40 与 typescript 4.8.4
This commit is contained in:
@@ -32,7 +32,7 @@ export interface TreeNodeProps {
|
||||
showCheckbox: boolean;
|
||||
showLine: boolean;
|
||||
selectedKey: any;
|
||||
checkStrictly: boolean;
|
||||
checkStrictly: boolean | string;
|
||||
collapseTransition: boolean;
|
||||
onlyIconControl: boolean;
|
||||
}
|
||||
|
||||
@@ -20,22 +20,24 @@ export interface OriginalTreeData {
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
export interface ReplaceFieldsOptions {
|
||||
id?: string;
|
||||
children?: string;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface TreeProps {
|
||||
checkedKeys?: KeysType;
|
||||
selectedKey?: any;
|
||||
data: OriginalTreeData;
|
||||
showCheckbox?: boolean;
|
||||
checkStrictly?: boolean;
|
||||
disabled?: boolean;
|
||||
edit?: EditType;
|
||||
checkedKeys?: KeysType;
|
||||
checkStrictly?: boolean | string;
|
||||
collapseTransition?: boolean;
|
||||
onlyIconControl?: boolean;
|
||||
selectedKey?: any;
|
||||
showLine?: boolean;
|
||||
disabled?: boolean;
|
||||
replaceFields?: {
|
||||
id?: string;
|
||||
children?: string;
|
||||
title?: string;
|
||||
};
|
||||
showCheckbox?: boolean;
|
||||
replaceFields?: ReplaceFieldsOptions;
|
||||
}
|
||||
|
||||
interface TreeEmits {
|
||||
|
||||
@@ -26,7 +26,7 @@ interface ReplaceFields {
|
||||
}
|
||||
|
||||
interface TreeConfig {
|
||||
checkStrictly: boolean;
|
||||
checkStrictly: boolean | string;
|
||||
showCheckbox: boolean;
|
||||
checkedKeys: StringOrNumber[];
|
||||
expandKeys: StringOrNumber[];
|
||||
@@ -135,7 +135,7 @@ class Tree {
|
||||
|
||||
treeForeach(tree: any, func: Function) {
|
||||
tree.forEach((data: any) => {
|
||||
data.children && this.treeForeach(data.children, func); // 遍历子树
|
||||
data.children && this.treeForeach(data.children, func);
|
||||
func(data);
|
||||
});
|
||||
}
|
||||
@@ -181,7 +181,7 @@ class Tree {
|
||||
}
|
||||
}
|
||||
|
||||
setCheckedKeys(checked: boolean, checkStrictly: boolean, node: TreeData) {
|
||||
setCheckedKeys(checked: boolean, checkStrictly: boolean | string, node: TreeData) {
|
||||
node.isChecked = checked;
|
||||
if (!checkStrictly) {
|
||||
if (node.parentNode) {
|
||||
|
||||
@@ -11,21 +11,23 @@ export interface OriginalTreeData {
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
export interface ReplaceFieldsOptions {
|
||||
id?: string;
|
||||
children?: string;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface TreeProps {
|
||||
checkedKeys?: KeysType;
|
||||
expandKeys?: KeysType;
|
||||
data: OriginalTreeData;
|
||||
checkStrictly?: boolean;
|
||||
checkStrictly?: boolean | string;
|
||||
showCheckbox?: boolean;
|
||||
edit?: EditType;
|
||||
collapseTransition?: boolean;
|
||||
onlyIconControl?: boolean;
|
||||
showLine?: boolean;
|
||||
replaceFields?: {
|
||||
id?: string;
|
||||
children?: string;
|
||||
title?: string;
|
||||
};
|
||||
replaceFields?: ReplaceFieldsOptions;
|
||||
}
|
||||
export interface TreeEmits {
|
||||
(e: "update:checkedKeys", keys: KeysType): void;
|
||||
|
||||
Reference in New Issue
Block a user