Property or method “btn“ is not defined on the instance but referenced during render. 报错原因及解决措施

 [Vue warn]: Property or method "btn" 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.

报错原因:属性或方法“btn”未在实例上定义,但在渲染过程中被引用。通过初始化该属性,确保该属性在数据选项中或对于基于类的组件是被动的。一般出现这种情况通常是方法未在methods中定义,或者定义了但是拼写错误,检查拼写。

 解决方式:找了半天错误,发现我把btn这个函数写成了bth!

救命!家人们!太粗心了!这个错误总结下!下次不能再犯了!!!!

你可能感兴趣的:(vue.js)