< div class= "questions-list-give" @ click.stop= "spotFabulous (item.id,item.switch,index)" >
<div>
<i class="iconfont icon-dianzan dz" v-if="item.switch == true" ></i>
<i class="iconfont icon-dianzan wdz" v-else></i>
<div>{{item.likeCount}}</div>
</div>
< / div >
/ / like
spotFabulous(id,swit,index){
let data = {
questionId:id,//
isLike:swit//
};
if(swit == false){
console.log(swit)
console.log("")
this.$set(this.listAnswersInfo[index],"switch",true)
}else{
console.log(swit)
console.log("")
this.$set(this.listAnswersInfo[index],"switch",false)
}
}
},