当前位置:   article > 正文

已定义,但提示 Property or method is not defined

property or method is not defined

分明已经定义了变量name,但依然提示:

  1. [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中定义的其他变量,有的出错,导致其他的成员没被识别

  1. data: function() {
  2. return {
  3. name:'',
  4. table1: new listtable(
  5. this.parent.id, //此处出错, 原因this.parent此时为null
  6. ),
  7. }

或者因为一些前面的 v-model="xxx" 

但是xxx没有在data中定义

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/315795
推荐阅读
相关标签
  

闽ICP备14008679号