🐛(component): 修复 tree 组件 checkedKeys 属性默认选中全部子集的问题

This commit is contained in:
就眠儀式 2022-10-10 23:25:05 +08:00
parent 34c7cba6ae
commit 98ca6a61b5
2 changed files with 2 additions and 5 deletions

View File

@ -116,11 +116,7 @@ class Tree {
});
node.isDisabled = nodeDisabled;
if (parentNode && parentNode.isChecked && checkStrictly == false) {
node.isChecked = true;
} else {
node.isChecked = checkedKeys.includes(nodeKey);
}
node.isChecked = checkedKeys.includes(nodeKey);
node.isLeaf = parentNode ? parentNode.isLeaf : expandKeys.includes(nodeKey);
node.isLeaf = nodeIsLeaf;

View File

@ -19,6 +19,7 @@
<li>[新增] datePicker 组件 type 属性为 date 与 datetime 时, 支持时间戳传入。</li>
<li>[修复] datePicker 组件 type 属性为 dateTime 时 同时选择日期与时间不生效问题。</li>
<li>[修复] datepicker 组件 type 属性为 mouth 时, v-model 为 number 类型时, 月份选择显示NaN。</li>
<li>[修复] tree 组件 checkedKeys 属性赋值默认子集全部选中的问题。</li>
</ul>
</li>
</ul>