[Vue warn]: Error in render: "TypeError: Cannot read property '0' of undefined

Posted goloving

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Vue warn]: Error in render: "TypeError: Cannot read property '0' of undefined相关的知识,希望对你有一定的参考价值。

  注意,只要出现Error in render,即渲染时候报错,此时应该去渲染位置去找错误,而不是函数里面。

  今天就碰到这个错误,我一直只注意着Cannot read property ‘0‘ of undefined,所以一直在函数里面调试找错,却一直没找到,最后才注意到Error in render,想着应该是渲染出错,果然去掉写的渲染方法,发现就没报错了。

  后来看渲染的v-for,发现有个字段写的不对,这才找到错误。都是马虎惹的祸啊,记录一下,勉励自己。

以上是关于[Vue warn]: Error in render: "TypeError: Cannot read property '0' of undefined的主要内容,如果未能解决你的问题,请参考以下文章

Vue(踩坑)vue.esm.js?efeb:628 [Vue warn]: Error in render: "TypeError: Cannot read property '0

[Vue warn]: Error in mounted hook: "ReferenceError: Can't find variable: Promise"

uni-app的Vue项目中Echarts的报错提示:[Vue warn]: Error in data(): “ReferenceError: echarts is not defined“

[Vue warn]: Error in created hook: “TypeError: Cannot read properties of undefined (reading ‘$on‘)“

[Vue warn]: Error in render: "TypeError: Cannot read property '0' of undefined

[Vue warn]: Error in nextTick: “TypeError: Right-hand side of ‘instanceof‘ is not an object“