学无先后,达者为师

网站首页 Vue 正文

vue中的事件绑定,突然报错不是实例上定义的

作者:weixin_52721089 更新时间: 2022-04-22 Vue

报错如下

Property or method "deleteBlackList" 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.
//“deleteBlackList”属性或方法不是在实例上定义的,而是在渲染时引用的。通过初始化属性,
//确保该属性是响应性的(无论是在data选项中,还是对于基于类的组件)。

本身的提示是未定义方法或者属性,我找了很久后发现,我把方法写在了methods外面,总结一下别人的一些问题,methods写错的,少些s的,写成钩子的,各种错误五花八门,建议仔细看看代码。

原文链接:https://blog.csdn.net/weixin_52721089/article/details/115324035

栏目分类
最近更新