<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>//点赞 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)
}
}
},
添加回答
举报
0/150
提交
取消