其他分享
首页 > 其他分享> > Vue报错: Property or method "changeLoginType" is not defined on the instance but referenced

Vue报错: Property or method "changeLoginType" is not defined on the instance but referenced

作者:互联网

原因

我这里是因为我代码中的方法不存在,我漏写了,后补充上就好了

image

解决方案

在methods中添加如下代码:

// 修改登录状态
changeLoginType(bool){
   this.loginType = bool
}

标签:Vue,render,代码,changeLoginType,referenced,bool,报错
来源: https://www.cnblogs.com/leoych/p/15376725.html