当前位置:   article > 正文

Property or method “id“ is not defined on the instance but referenced during render.Make sure ......_"property or method \"id\" is not defined on the i

"property or method \"id\" is not defined on the instance but referenced during"

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: '',
}
  • 1
  • 2
  • 3

以上就是关于“ Property or method “id” is not defined on the instance but referenced during render.Make sure … ” 的全部内容。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/315733
推荐阅读
相关标签
  

闽ICP备14008679号