场景:不同值显示的字体颜色不同
It is necessary to dynamically modify the font color, the sample code is as follows:
<view :style="{ color: statusColor, 'margin-top': 40 + '%;margin-left: 8px;' }">
{
{
approveCard.status}}
</view>
data() {
return {
statusColor: this.approveCard.statusColor,
status: this.approveCard.status,
};
},
The effect is as follows: