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 initi.
·
报错如下:
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”不是在实例上定义的,而是在呈现期间引用的。通过初始化该属性,确保该属性是反应性的,无论是在data选项中,还是在基于类的组件中。
原因:
你的“”xxx‘’属性或者"xxx"方法没有定义,查看你的data或者methods或者prop
解决:
export default {
data(){
return{
xxx:""
},
methods:{
xxx(){}
}
},
}
更多推荐
已为社区贡献1条内容
所有评论(0)