Vue报错(Property or method “xxx” is not defined on the instance but referenced during render.)

作者:

报错如下:
Property or method “xxx” 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.

原因:
你的“”xxx‘’属性或者”xxx”方法没有定义

 

解决:

export default { 
 data(){ 
   return{ 
     xxx:""  //去定义
   }, 
   methods:{ 
     xxx(){ } //去定义
   } 
 }, 
}

https://blog.csdn.net/qq_39242027/article/details/85001653