<div class="cell-list" :class="{cellActive:index==num}" v-for="(item,index) in menList" :key="index"
@click="menubtn(index,item.name)">
<i class="iconfont" :class="[item.Icon,{cellActive:index==num}]" ></i>
<span class="cell-span" :class="{cellActive:index==num}">{{item.name}}</span>
</div>
methods: {
menubtn(index,name){
console.log(name)
this.num = index
}
网友评论