//选择营销来源
sourceType(index) {
let arrIndex = this.spanIndex.indexOf(index);
if (arrIndex > -1) {
this.spanIndex.splice(arrIndex, 1);
} else {
this.spanIndex.push(index);
}
console.log(this.spanIndex);
},
<div
v-for="(box, index) in source"
:key="box.value"
:class="spanIndex.indexOf(index) > -1 ? 'sourceBox1' : 'sourceBox'"
@click="sourceType(index)"
>