Property or method “id“ is not defined on the instance but referenced during render.Make sure ......

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 … ” 的全部内容。

猜你喜欢

转载自blog.csdn.net/qq_35393869/article/details/108596710