js,除了数组为空外,每件事都很好用。我尝试使用if else,但如果数组为空,手柄仍然会呈现一个空行。
{{#each invoice_id.invoice_services}}
<tr class="uk-table-middle">
<td>
<span class="uk-text-large">{{ service_name }}</span><br/>
<span class="uk-text-muted uk-text-small">{{ service_description }}</span>
</td>
<td>
{{ service_rate }}
</td>
<td class="uk-text-center">
{{ service_hours }}
</td>
<td class="uk-text-center">
{{ service_vat }}
</td>
<td class="uk-text-center">
{{ service_total }}
</td>
</tr>
{{/each}}