<div v-bind:class="{ active: isActive }"></div>
class="static"
v-bind:class="{ active: isActive,'text-danger': hasError }">
</>
data: {
isActive: true,hasError: false
}
="classObject">
data: {
classObject: {
active: true,'text-danger': false
}
}
data: {
isActive: true,error: null
},computed: {
classObject: function () {
return {
active: this.isActive && !this.error,'text-danger': this.error && this.error.type === 'fatal'
}
}
}
="[activeClass,errorClass]"
data: {
activeClass: 'active',errorClass: 'text-danger'
}
="[isActive ? activeClass : '',1)">>
="[{ active: isActive },1)">>
Vue.component('my-component'
})
my-component ="baz boo"my-component>
p ="foo bar baz boo">Hip>
v-bind:style="{ color: activeColor,fontSize: fontSize + 'px' }"
data: {
activeColor: 'red',fontSize: 30
}
="styleObject"
data: {
styleObject: {
color: 'red',fontSize: '13px'
}
}
="[baseStyles,overridingStyles]">
:style="{ display: ['-webkit-box','-ms-flexbox','flex'] }">