外部重复的内部重复访问值是什么? 这是我正在尝试的一个例子:
this.headers = [
{text: 'Head 1', value: 'Col1'},
{text: 'Head 2', value: 'Col2'},
{text: 'Head 3', value: 'Col3'},
];
this.tableData = [
{'Col1': 1.1, 'Col2': 1.2, 'Col3': 1.3},
{'Col1': 2.1, 'Col2': 2.2, 'Col3': 2.3},
{'Col1': 3.1, 'Col2': 3.2, 'Col3': 3.3},
{'Col1': 4.1, 'Col2': 4.2, 'Col3': 4.3},
];
tableData
是基于headers
<table class="table table-striped">
<thead>
<tr>
<th repeat.for="head of headers">${head.text}</th>
</tr>
</thead>
<tbody>
<tr repeat.for="line of tableData">
<td repeat.for="head of $parent.headers">
${$parent.line[head.value]}
</td>
</tr>
</tbody>
</table>
我回来的只是空桌身
<table class="table table-striped">
<thead>
<tr>
<th>Head 1</th>
<th>Head 2</th>
<th>Head 3</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
我做错了什么????