update Table tree
This commit is contained in:
parent
52a036ec43
commit
793b73035a
2 changed files with 6 additions and 2 deletions
|
@ -24,6 +24,10 @@
|
|||
title: 'Age',
|
||||
key: 'age'
|
||||
},
|
||||
{
|
||||
title: 'Date',
|
||||
key: 'date'
|
||||
},
|
||||
{
|
||||
title: 'Address',
|
||||
key: 'address'
|
||||
|
|
|
@ -930,7 +930,7 @@
|
|||
data.forEach((row, index) => {
|
||||
row._index = index;
|
||||
row._rowKey = rowKey++;
|
||||
if (row.child && row.children.length) {
|
||||
if (row.children && row.children.length) {
|
||||
row.children = this.makeChildrenData(row);
|
||||
}
|
||||
});
|
||||
|
@ -938,7 +938,7 @@
|
|||
},
|
||||
makeChildrenData (data) {
|
||||
if (data.children && data.children.length) {
|
||||
data.children.map((row, index) => {
|
||||
return data.children.map((row, index) => {
|
||||
const newRow = deepCopy(row);
|
||||
newRow._index = index;
|
||||
newRow._rowKey = rowKey++;
|
||||
|
|
Loading…
Add table
Reference in a new issue