fix: 修复tree组件多选时通过selected默认选中bug

This commit is contained in:
harrywan 2021-05-07 17:31:52 +08:00
parent 3713d4b023
commit 73d00120d1
2 changed files with 7 additions and 2 deletions

View File

@ -13,6 +13,11 @@ $dark-color: rgba(255, 255, 255, 0.65);
$dark-selected-bg: rgb(24, 144, 255); $dark-selected-bg: rgb(24, 144, 255);
$dark-selected-color: #ffffff; $dark-selected-color: #ffffff;
html, body {
width: 100%;
height: 100%;
}
.layout { .layout {
position: absolute; position: absolute;
left: 0; left: 0;

View File

@ -173,8 +173,8 @@ export default {
} }
} else { } else {
// //
this.$set(obj, 'checked', node.checked || false); this.$set(obj, 'checked', node.selected || false);
this.$set(obj, 'childrenCheckedStatus', node.checked ? '2' : '0'); this.$set(obj, 'childrenCheckedStatus', node.selected ? '2' : '0');
if (obj.selected) { if (obj.selected) {
this.selectedNode = obj; this.selectedNode = obj;
} }