Chadrick Blog

vue list item toggle class on click example

<div>
    <ul class="list-group">
        <li class="list-group-item" v-for="(item,index) in items" @click="toggle\_active(item)" :key="index" v-bind:class="{active: item.isActive}">
            ${item.dirname}
        </li>
    </ul>
</div>