if conditional in :class vue js code example
Example 1: bind style with condition in vue
v-bind:style= "[condition ? {styleA} : {styleB}]"
Example 2: vue class binding
<div v-bind:class="{ active: isActive }"></div>
v-bind:style= "[condition ? {styleA} : {styleB}]"
<div v-bind:class="{ active: isActive }"></div>