作者:huangpeishan49 | 来源:互联网 | 2023-09-18 12:52
this.diaryInfoList.forEach((item)=>{
1 2 3
| item.showText = false;
item.showBtn = false;
item.showBtnText = false; |
})
数据格式是:
let list= [
]
下面是我使用的方法,都无效↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
第一种:
this.diaryInfoList[i].showBtn = true;
this.diaryInfoList[i].showText = true;
this.diaryInfoList[i].showBtnText = true;
this.$forceUpdate()
第二种:
this.$set(this.diaryInfoList[i], "showBtn", true)
this.$set(this.diaryInfoList[i], "showText", true)
this.$set(this.diaryInfoList[i], "showBtnText", true)