美文网首页
uniapp出现ReferenceError: Can't fi

uniapp出现ReferenceError: Can't fi

作者: 金蛇郎君木子肆 | 来源:发表于2020-09-14 09:27 被阅读0次

当你想在页面的onLoad方法你调用其他方法时

onLoad() {
xxx()
},

出现

[Vue warn]: Error in onLoad hook: "ReferenceError: Can't find variable: xxx" (found at pages/index/index.vue:1) __ERROR ReferenceError: Can't find variable: xxx __ERROR

改成

onLoad() {
this.xxx()
},

🍻

相关文章

网友评论

      本文标题:uniapp出现ReferenceError: Can't fi

      本文链接:https://www.haomeiwen.com/subject/azmaektx.html