Skip to content

Commit bd6c733

Browse files
authored
Merge pull request #96 from wsfe/fix/tree-search-check-all
fix: tree search check all
2 parents dfb4bfd + c617ecd commit bd6c733

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wsfe/vue-tree",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"types": "./types",
55
"description": "A vue tree component using virtual list.",
66
"main": "./dist/vue-tree.umd.js",

src/components/TreeSearch.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,11 @@ function search(keyword1?: string): Promise<void> {
224224
//#region Event handlers
225225
/** 处理全选点击 */
226226
function handleCheckAll(): void {
227-
const keyField = treeRef.value?.keyField
227+
const keyField = props.keyField
228228
if (props.searchDisabled || checkAllStatus.disabled || !treeRef.value || !keyField) return
229229
230230
const currentVisibleKeys = treeRef.value.getCurrentVisibleNodes().map((node: TreeNode) => node[keyField])
231-
if (checkAllStatus.checked || checkAllStatus.indeterminate) {
231+
if (checkAllStatus.checked) {
232232
// 反选
233233
treeRef.value.setCheckedKeys(currentVisibleKeys, false)
234234
} else {

0 commit comments

Comments
 (0)