Merge pull request #445 from jikkai/fix/tree-checking-disabled-node

fix: disabled node can be checked
This commit is contained in:
Aresn 2020-06-23 17:47:19 +08:00 committed by GitHub
commit 27427ac418
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -174,7 +174,11 @@
if (this.checkStrictly) return; if (this.checkStrictly) return;
for (let key in changes) { for (let key in changes) {
this.$set(node, key, changes[key]); if (key === 'checked' && node.disabled) {
this.$set(node, key, node.checked);
} else {
this.$set(node, key, changes[key]);
}
} }
if (node[this.childrenKey]) { if (node[this.childrenKey]) {
node[this.childrenKey].forEach(child => { node[this.childrenKey].forEach(child => {