Error: Property or method “value” is not defined on the instance but referenced during render. Solution

vscode不报错,但是在控制台中报错:Property or method "value" 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. 

pictured as

 The error translates to: Property or method 'value' is not defined on the instance but referenced during rendering. Make sure the property is responsive by initializing it, either in the data option, or for class-based components.

From the error report, we can know that the property or method "value" is not defined on the instance, so we check the source code, where "value" appears.

The source code is as follows:

From here we can see that a value is bound two-way. However, this value is not defined in data, so an error is reported. Then we can define this "value" in data. 

 

Guess you like

Origin blog.csdn.net/qq_56715703/article/details/130841962