Property or method "list" is not defined on the instance but referenced during render.解决

一、问题描述
在之前的项目开发中,也遇到了这样的一个问题, Property or method "list" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. 如图所示:
在这里插入图片描述

二、问题解决
这个问题的意思是 属性或方法“list”未在实例上定义,但在渲染期间被引用。通过初始化该属性,确保该属性是被动的,无论是在数据选项中,还是对于基于类的组件。所以,由此我们就知道了,在vuetemplate中我们使用了list数据,但是在data中还并没有被定义,就被使用了,造成了这个错误。在data中定义一下这个list的数据,就可以解决这个问题了。

发布了146 篇原创文章 · 获赞 34 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/weixin_42614080/article/details/103783959