vue项目Property or method "xxx" is not defined on the instance but referenced during render. Mak...错误

vue项目Property or method "xxx" is not defined on the instance but referenced during render. Mak...错误

错误的原因

来自翻译:

  • 属性或方法“tableData”不是在实例上定义的,而是在呈现期间引用的。通过初始化该属性,确保该属性是反应性的,无论是在data选项中,还是对于基于类的组件

他的意思:

  • 属性或方法“xxx” 对应的数据没有找到,你应该在 date 里面写上对应的数据

如何改错

  1. 找到你写错的哪个页面
    vue项目Property or method "xxx" is not defined on the instance but referenced during render. Mak...错误
  2. 找到对应错误的属性或方法
    vue项目Property or method "xxx" is not defined on the instance but referenced during render. Mak...错误
    这个是你自己写的属性或方法,你写的是啥就是啥
    vue项目Property or method "xxx" is not defined on the instance but referenced during render. Mak...错误
    我这里用的 :data
    很显然,我在 data()里面并没有写东西,当然错误了
    这时,我写上对应的数据
    vue项目Property or method "xxx" is not defined on the instance but referenced during render. Mak...错误
    错误就消失啦!