0
我有以下選擇
{{#each orders_db}}
<tr>
<td>{{item}}</td>
<td>
<select class="bootstrapselect orderstatus">
<option data-content="<span class='label label-info'>{{status}}</span>">{{status}}</option>
<option disabled>--------</option>
<option data-content="<span class='label label-primary'>Awaiting</span>">Awaiting</option>
<option data-content="<span class='label label-info'>Taken</span>">Taken</option>
<option data-content="<span class='label label-success'>Delivered</span>">Delivered</option>
<option data-content="<span class='label label-warning'>Shipped</span>">Shipped</option>
<option data-content="<span class='label label-danger'>Cancelled</span>">Cancelled</option>
</select>
</td>
<td>{{client}}</td>
<td>{{location}}</td>
<td>{{responsible}}</td>
</tr>
{{/each}}
在JS
如何改變取決於狀態的價值
? 例如。運送應該有標籤警告,取消應該有標籤危險等。