<div class='niubi'> <p :class="active===index ? 'isActive' : ''" @click="bb(index)" v-for="(item,index) in arrow" :key="index"> {{item.name}} </p> </div>
arrow:[ { name:'大哥' }, { name:'小弟' }, { name:'第中弟' } ], active:0
方法:
bb(index){
this.active=index
},
样式自己去写