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',
|
title: 'Age',
|
||||||
key: 'age'
|
key: 'age'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'Date',
|
||||||
|
key: 'date'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'Address',
|
title: 'Address',
|
||||||
key: 'address'
|
key: 'address'
|
||||||
|
|
|
@ -930,7 +930,7 @@
|
||||||
data.forEach((row, index) => {
|
data.forEach((row, index) => {
|
||||||
row._index = index;
|
row._index = index;
|
||||||
row._rowKey = rowKey++;
|
row._rowKey = rowKey++;
|
||||||
if (row.child && row.children.length) {
|
if (row.children && row.children.length) {
|
||||||
row.children = this.makeChildrenData(row);
|
row.children = this.makeChildrenData(row);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -938,7 +938,7 @@
|
||||||
},
|
},
|
||||||
makeChildrenData (data) {
|
makeChildrenData (data) {
|
||||||
if (data.children && data.children.length) {
|
if (data.children && data.children.length) {
|
||||||
data.children.map((row, index) => {
|
return data.children.map((row, index) => {
|
||||||
const newRow = deepCopy(row);
|
const newRow = deepCopy(row);
|
||||||
newRow._index = index;
|
newRow._index = index;
|
||||||
newRow._rowKey = rowKey++;
|
newRow._rowKey = rowKey++;
|
||||||
|
|
Loading…
Add table
Reference in a new issue