在style中怎么放自己定义的属性,例如 style="color: 自己定义的属性;",我想将下面for循环遍历出来的颜色属性放在style中,有什么方式?
:style="{ color: item.statusColor}"
:style="{ color: ${item.statusColor}
}",模板字符串
:style="{color: item.statusColor}"
你这里有个问题是v-for和v-if最好不要一起用
:style="{'color':item.statusColor}"