From c8e76409a2a570286ac3765903f2ecd10dac3d13 Mon Sep 17 00:00:00 2001 From: ChuChencheng Date: Mon, 1 Jul 2024 01:54:19 +0800 Subject: [PATCH 1/2] fix: tree search check all --- src/components/TreeSearch.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/TreeSearch.vue b/src/components/TreeSearch.vue index ad525e6..12171c6 100644 --- a/src/components/TreeSearch.vue +++ b/src/components/TreeSearch.vue @@ -224,11 +224,11 @@ function search(keyword1?: string): Promise { //#region Event handlers /** 处理全选点击 */ function handleCheckAll(): void { - const keyField = treeRef.value?.keyField + const keyField = props.keyField if (props.searchDisabled || checkAllStatus.disabled || !treeRef.value || !keyField) return const currentVisibleKeys = treeRef.value.getCurrentVisibleNodes().map((node: TreeNode) => node[keyField]) - if (checkAllStatus.checked || checkAllStatus.indeterminate) { + if (checkAllStatus.checked) { // 反选 treeRef.value.setCheckedKeys(currentVisibleKeys, false) } else { From c617ecdfa6a805bf00645a8666872968c727dfa3 Mon Sep 17 00:00:00 2001 From: ChuChencheng Date: Mon, 1 Jul 2024 01:55:53 +0800 Subject: [PATCH 2/2] chore: update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bcfcd5b..f7dd8da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@wsfe/vue-tree", - "version": "4.0.0", + "version": "4.0.1", "types": "./types", "description": "A vue tree component using virtual list.", "main": "./dist/vue-tree.umd.js",