item.pm == 1值为true则显示绿色#1abb1d,false则显示红色#e93323
item.pm == 1
#1abb1d
#e93323
<view class="price" :style="{'color':(item.pm === 1 ? '#1abb1d':'#e93323')}"> {{ item.number }} </view>
← CSS渐变边框 CSS样式穿透→