如图,用的是table布局,怎么让总价靠右?
代码
<table>
<tr>
<th v-for="head in tableHeads" @click="changeOrderType(head)" :class="{active:head.active}">{{ head.label }}</th>
</tr>
<tr v-for="item in tableData" :key="item.period">
<td v-for="head in tableHeads">{{ item[head.key] }}</td>
</tr>
<tr>
<td align="right">总价:</td>
</tr>
</table>
可以通过插入一个占位td方式,指定占位td的colspan为表格列数-1即可