new Vue({ el: '#app', data: { isActive: true, hasError: true } })
<div id="app"> <div class="static" v-bind:class="{ active: isActive, 'text-danger': hasError }"> </div> </div>
.active { width: 100px; height: 100px; background: green; } .text-danger { width: 50px; height: 50px; background: red; }