update Table tree

This commit is contained in:
梁灏 2020-01-06 11:17:09 +08:00
parent 6885f5ec49
commit 1e2341aa5d
4 changed files with 44 additions and 24 deletions

View file

@ -142,14 +142,15 @@
},
isTrShow (rowKey) {
let status = true;
this.data.forEach(row => {
for (let i in this.objData) {
const row = this.objData[i];
const showChildren = row._isShowChildren;
if (row._rowKey === rowKey) {
status = status && showChildren;
} else if (row.children && row.children.length) {
status = this.getTrStatus(rowKey, row, status && showChildren);
}
});
}
return status;
},
getTrStatus (rowKey, data, parentStatus) {