@页面渲染出错
TypeError: Cannot read property ‘profilePhoto’ of undefined
19:29:21.153 cid unmatched [object Object] at view.umd.min.js:1
19:29:21.153 TypeError: Invalid attempt to destructure non-iterable instance.
19:29:21.158 In order to be iterable, non-array objects must have a Symbol.iterator method. at view.umd.min.js:1
19:29:21.189 cid unmatched [object Object] at view.umd.min.js:1
19:29:21.220 TypeError: Invalid attempt to destructure non-iterable instance.
19:29:21.252 In order to be iterable, non-array objects must have a Symbol.iterator method. at view.umd.min.js:1
19:29:30.326 Error: [JS Framework] Failed to receiveTasks, instance (3) is not available.

获取的数组对象如下:
在这里插入图片描述

只需在最外层加个v-if判断数组长度,因为渲染过快而数据没有获取到就会存在报错,后面能正常渲染,这就是我的解决办法了!!!
在这里插入图片描述

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐