update Table tree
This commit is contained in:
parent
6885f5ec49
commit
1e2341aa5d
4 changed files with 44 additions and 24 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue