已定义,但提示 Property or method is not defined
分明已经定义了变量name,但依然提示:[Vue warn]: Property or method "name" 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
·
分明已经定义了变量name,但依然提示:
[Vue warn]: Property or method "name" 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.
原因:data中定义的其他变量,有的出错,导致其他的成员没被识别
data: function() {
return {
name:'',
table1: new listtable(
this.parent.id, //此处出错, 原因this.parent此时为null
),
}
或者因为一些前面的 v-model="xxx"
但是xxx没有在data中定义
更多推荐
已为社区贡献4条内容
所有评论(0)