vue3 vue报错 Uncaught(inpromise)TypeError:Cannot read properties of undefined(reading“data) 解决办法
vue3 vue报错 Uncaught(inpromise)TypeError:Cannot read properties of undefined(reading"data) 解决办法
·
vue 开发中报错 Uncaught(inpromise)TypeError:Cannot read properties of undefined(reading"data)
查找原因 是因为 v-for 嵌套的问题
错误写法
<div v-for="item in data">
<div v-for="m in m.data"></div>
</div>
正确应该是:
<div v-for="item in data">
<div v-for="m in item.data"></div>
</div>
更多推荐
已为社区贡献1条内容
所有评论(0)