1)对象语法:
v-bind:class="{active:isActive,'text-danger':hasError}"
2)数组语法:
<div v-bind:class="[activeClass,errorClass]">
data:{
activeClass:'active',
errorClass:'text-danger'
}
3)style绑定-对象语法:
v-bind:style="{color:activeColor,fontsize:fontSize+'px'}"