点我去Gitee
点我去Gitee

plus is not defined解决方法

plus(xxx) is not defined

前言

最近在写html5+app项目时 遇到一个plus很坑的问题 明明写好了plusready 而且plus能正常打印 plus的api也能正常使用
但是!!!就是报plus is not defined !!!
思来想去 应该不是代码的问题 应该是环境的问题
果不奇然 问题出在Eslint。
以下是解决方法

"globals":{
   "plus": true
 },

加到package.json中的红框框中去

然后重启,解决

posted @ 2021-09-19 16:02  biuo  阅读(6967)  评论(0编辑  收藏  举报