v-for渲染出列表,在执行列表折叠展开时 v-if不生效
解决方法
// 展开折叠
getUpDown (idx) {
this.rooms[idx].upDownShow = !this.rooms[idx].upDownShow
this.$forceUpdate() // 因为数据层次太多,render函数没有自动更新,需手动强制刷新渲染。
},
解决方法
// 展开折叠
getUpDown (idx) {
this.rooms[idx].upDownShow = !this.rooms[idx].upDownShow
this.$forceUpdate() // 因为数据层次太多,render函数没有自动更新,需手动强制刷新渲染。
},