diff --git a/examples/routers/table.vue b/examples/routers/table.vue index 3a02451b..248fb6f0 100644 --- a/examples/routers/table.vue +++ b/examples/routers/table.vue @@ -24,6 +24,10 @@ title: 'Age', key: 'age' }, + { + title: 'Date', + key: 'date' + }, { title: 'Address', key: 'address' diff --git a/src/components/table/table.vue b/src/components/table/table.vue index 75aeb63c..239263e7 100644 --- a/src/components/table/table.vue +++ b/src/components/table/table.vue @@ -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++;