作者:倒叙的时光_SX_126 | 来源:互联网 | 2023-08-01 16:37
效果:
{{item}}
data:{
spanIndex:[],
}
methods: {
changeSpan(index){
let arrIndex = this.spanIndex.indexOf(index);
// console.log(arrIndex);
if(arrIndex>-1){
this.spanIndex.splice(arrIndex,1);
}else{
this.spanIndex.push(index);
}
},