<div v-for="(item, index) in 3" :key="index">
<a @click="goList(index)" @mouseover="getCur(index, item)" :class="curIndex == index ? 'current' : ''">
<span>{
{ item}}</span>
</a>
</div>
// tab滑动
getCur(a, b) {
if (a == 0) {
this.curIndex = 0;
} else if (a == 1) {
this.curIndex = 1;
} else {
this.curIndex = 2;
}
},
// tab 点击事件
goList(a) {
if (a == 0) {
this.$router.push("******");
} else if (a == 1) {
this.$router.push("****");
} else {
// *********
}
},