注意:
- 凡是有-的style属性名都要变成驼峰式,比如font-size要变成
fontSize
- 除了绑定值,其他的属性名的值要用引号括起来,比如
backgroundColor:'#00a2ff'
而不是 backgroundColor:#00a2ff
【对象】
-
html :style="{ color: activeColor, fontSize: fontSize + 'px' }"
-
html :style="{color:(index==0?conFontColor:'#000')}"
【数组】
html :style="[baseStyles, overridingStyles]"
html :style="[{color:(index==0?conFontColor:'#000')},{fontSize:'20px'}]"
【三目运算符】
html :style="{color:(index==0?conFontColor:'#000')}"
html :style="[{color:(index==0?conFontColor:'#000')
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)