VueJS - How can I bind multiple class from object that created by v-for? VueJS - How can I bind multiple class from object that created by v-for? vue.js vue.js

VueJS - How can I bind multiple class from object that created by v-for?


Try something like this :class="[{ active: active === i }, v.name]"

<div id="app">  <ul>    <li v-for="v, i in listAry" :class="[{ active: active === i }, v.name]">      {{ v.text }}    </li>  </ul></div>