mirror of https://github.com/ElemeFE/element
Tree: fix a bug that caused `showCheckbox` props on `Tree` can not affect their children `tree-node`
parent
62cce0e98c
commit
c2e7e17a21
|
@ -61,6 +61,7 @@
|
|||
:render-content="renderContent"
|
||||
v-for="child in node.childNodes"
|
||||
:render-after-expand="renderAfterExpand"
|
||||
:show-checkbox="showCheckbox"
|
||||
:key="getNodeKey(child)"
|
||||
:node="child"
|
||||
@node-expand="handleChildNodeExpand">
|
||||
|
@ -94,6 +95,10 @@
|
|||
renderAfterExpand: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
showCheckbox: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -127,7 +132,6 @@
|
|||
tree: null,
|
||||
expanded: false,
|
||||
childNodeRendered: false,
|
||||
showCheckbox: false,
|
||||
oldChecked: null,
|
||||
oldIndeterminate: null
|
||||
};
|
||||
|
@ -258,8 +262,6 @@
|
|||
this.node.updateChildren();
|
||||
});
|
||||
|
||||
this.showCheckbox = tree.showCheckbox;
|
||||
|
||||
if (this.node.expanded) {
|
||||
this.expanded = true;
|
||||
this.childNodeRendered = true;
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
:node="child"
|
||||
:props="props"
|
||||
:render-after-expand="renderAfterExpand"
|
||||
:show-checkbox="showCheckbox"
|
||||
:key="getNodeKey(child)"
|
||||
:render-content="renderContent"
|
||||
@node-expand="handleNodeExpand">
|
||||
|
|
Loading…
Reference in New Issue