Vue报错: Property or method "id" 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.
报错解释:
报错截图:
报错分析:
- 参考博客:点击前往
解决办法:
在data
中定义变量 id
以声明变量,即可解除报错。
代码如下:
data: {
id: '',
}
以上就是关于“ Property or method “id” is not defined on the instance but referenced during render.Make sure … ” 的全部内容。