ElemeFE / ElemeFE/element

[bug report] Tree: when the default checked keys are the first two child nodes, it is judged that all the child nodes are checked by mistake

Open
#19,400 2 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Element UI version
2.13.1

### OS/Browsers version
macOS 10.15.4/Chrome版本 81.0.4044.138

### Vue version
2.6.11

### Reproduction Link
https://codepen.io/ilyp/pen/KKdBqaQ?__cf_chl_jschl_tk__=9e046696012765b98719baba051a972ecd7e4a7c-1589359630-0-AVNC8yK_tHAY2AxyypbTT2Ppli7EoYwZ-BUW7pTrHjYRzKSaAHTcTQjZiDV9tmfqT8-45OebYgpqmEuXBjTTr5ci1Vrlt2U27B7qikT9ZmZXUEPM-F7baQIhTfK_P8zde44CCu7GvQUbrQs4OsV7PouapY1YpnA2yViEy7Pl_ipanWNji3HsNhLRlHewlExKBig1HIA_0lECs7N7uBCu5gcbANxD5gQq6G4jlNSfXFYp5YUtnHvdA6TJ4InT4usbv1bykTJaE1Qd39wgYZFfqIIgYmqswWcA9pnO5doRpNltSR00SqcVIYjC-98XErkD29D1SJe2YO_aLYoWwqG0vM8z99TaO0M4Ksz6v5HzfXiy

### Steps to reproduce
1.模板:
```

```
2. 节点加载函数
```
loadNode (node, resolve) {
if (node.level === 0) {
return resolve([{ id: '0', label: 'root' }]);
}
if (node.level > 1) {
return resolve([]);
}
return resolve([{ id: '1', label: '1'}, { id: '2', label: '2'}, { id: '3', label: '3'}]);
}
```

### What is Expected?
点击root节点(并未点击复选框),渲染结果只选中id为'1','2'的2个子节点

### What is actually happening?
点击root节点(并未点击复选框),结果root节点和所有子节点全部被选中

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.