mirror of https://github.com/ElemeFE/element
Tree: fix updateKeyChildren
parent
03ccdb4fbc
commit
fa522dd2bc
|
@ -198,10 +198,9 @@ export default class TreeStore {
|
||||||
const node = this.nodesMap[key];
|
const node = this.nodesMap[key];
|
||||||
if (!node) return;
|
if (!node) return;
|
||||||
const childNodes = node.childNodes;
|
const childNodes = node.childNodes;
|
||||||
for (let i = 0, j = childNodes.length; i < j; i++) {
|
childNodes.forEach(child => {
|
||||||
const child = childNodes[i];
|
|
||||||
this.remove(child.data);
|
this.remove(child.data);
|
||||||
}
|
});
|
||||||
for (let i = 0, j = data.length; i < j; i++) {
|
for (let i = 0, j = data.length; i < j; i++) {
|
||||||
const child = data[i];
|
const child = data[i];
|
||||||
this.append(child, node.data);
|
this.append(child, node.data);
|
||||||
|
|
Loading…
Reference in New Issue