报错图示:
报错具体信息:
[Vue warn]: Property or method "password" 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. See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
报错翻译:属性或方法“password”未在实例上定义,但在渲染过程中被引用。通俗来讲就是,你在html中用了password属性,但是在js部分没有定义。
解决措施:在 script 中的 data 或 method 中添加相关属性。或者是检查 template 部分的属性引用是否正确,层级关系是否正确。
这里以调用element-ui中的input标签为例,检查属性是否定义,检查属性层级是否正确。以下标红框的是报错的根源。