
参考链接:https://blog.csdn.net/qq_38881495/article/details/89298562
<div class="cycles">
<p class="cLeft">统计周期:</p>
<p class="cRight"><span @click="clickBtn(index)" :class="{isActive:isChange==index}" :key="item.id" v-for="(item,index) in cycleList">{{item.name}}</span></p>
</div>
clickBtn(index) {
if (index != this.isChange) {
this.isChange = index;
this.form.num = index + 1;
} else {
this.isChange = -1;
this.form.num = "";
}
},
网友评论