v-for渲染出列表,在执行列表折叠展开时 v-if不生效

解决方法
// 展开折叠
getUpDown (idx) {
this.rooms[idx].upDownShow = !this.rooms[idx].upDownShow
this.$forceUpdate() // 因为数据层次太多,render函数没有自动更新,需手动强制刷新渲染。
},
posted @ 2022-06-14 10:51  sosolucky  阅读(98)  评论(0编辑  收藏  举报