:style的使用
2020-01-19 本文已影响0人
荼蘼toome

<span :style="{ color: goodsOrder.status==2?'#5ab77f':'#f44'}">{{goodsOrder.status==2?'支付成功':(goodsOrder.status==0?'未支付':'1支付失败')}}</span>
<span :style="{ color: goodsOrder.status==2?'#5ab77f':'#f44'}">{{goodsOrder.status==2?'支付成功':(goodsOrder.status==0?'未支付':'1支付失败')}}</span>