Vue踩坑日记之v-for嵌套遍历时不能遍历对象中的数组

数据如图

image.png
 

网页代码

image.png

计划效果

image.png

实际效果

image.png

原因:

对象嵌套了数组,数组嵌套了对象,且是多层的,因此Vue无法检测到内部的更新或增删。

解决办法:

this.$forceUpdate();//this代表的是vue对象
posted @ 2020-03-09 06:16  HumorChen99  阅读(2)  评论(0编辑  收藏  举报  来源