Skip to content

Commit c8e7640

Browse files
committed
fix: tree search check all
1 parent dfb4bfd commit c8e7640

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)