1. for和forEach区别
两者都可以遍历vue中的数组对象,但是forEach中不能使用return或break跳出循环。
obj.forEach(function(item, key){ obj.aside = item.list_child; return; //此行代码无效});