样式表
.registered {
background-color: #FFF9E5;
}
.unregistered:hover {
background-color: #D9EDF7;
}
HTML
<tr class="gl_tr_wrap" v-bind:class="invoice.approval_status == 1 ? 'registered' : 'unregistered'" v-for="invoice in params.invoice_lists">
<td class="padding"> {{ invoice.invoice_name }} </td>
<td class="padding"> {{ invoice.invoice_price }} </td>
<td class="padding"> {{ params.user_arr[invoice.apply_id] }} </td>
<td class="padding"> {{ invoice.apply_time_format }} </td>
<td class="padding"> {{ params.user_arr[invoice.approval_id] }} </td>
<td class="padding"> {{ invoice.approval_time_format }} </td>
<td class="padding"> {{ invoice.approval_status == 1 ? '已登记' : '未登记' }} </td>
<td class="padding">
<a href="#">明细/编辑</a>
</td>
</tr>
效果