我刚接触Vue.js
,正在try 合并具有相同值的行,但我的表没有正确显示.我被困住了,有人能给我建议吗?
async getNetworks(audId) {
try
{
const response = await this.axios.get("/s/teams/network-groupss?audId=" + audId);
if (!this.networkGroups[audId])
{
this.$set(this.networkGroups, audId, {});
this.$set(this.networkGroups[audId], 'isExpanded', false);
}
this.$set(this.networkGroups[audId], 'data', response.data ? response.data.data : []);
}
catch (error)
{
console.log(error.message);
}
}
<tbody class="network_Group">
<tr
v-for="(networkGroup) in networkGroups[team.id].data"
:key="networkGroup.id"
:class="{ odd2: index % 2 !== 0 }">
<td
class="text-center data-column first_row">
<span> {{ networkGroup.source }} </span>
</td>
<td class="text-center data-column">
<span> {{ networkGroup.name }} </span>
</td>
<td class="text-nowrap text-left breakAll">
<span> {{ networkGroup.accountId }}</span>
</td>
<td class="text-center data-column">
<span> {{ networkGroup.size }} </span>
</td>
</tr>
</tbody>
这是我的桌子: