0👍
✅
isActive
should be set to every object e
, you should change your code like this:
computed: {
activeDataBox () {
return this.dataBox.map(e => {
e.isActive = false
return e
})
}
}
<div class="pageContent" v-for="(item,index) in activeDataBox[selectedTab]">
<span v-for="(e,i) in activeDataBox[selectedTab][index]">
<h4>{{i}}</h4>
<ul v-bind:class="{activeClass:e.isActive}">
<li v-for="m in e">{{m.name}}</li>
</ul>
<span v-if="!e.isActive" v-on:click="{e.isActive=!e.isActive}" class="moreIcon">More..</span>
</span>
</div>
Source:stackexchange.com