美文网首页
微信小程序 - wepy问题集(实时更新)

微信小程序 - wepy问题集(实时更新)

作者: 刘_小_二 | 来源:发表于2021-09-22 13:50 被阅读0次

1.0 wepy.js微信小程序报错'wx' is not defined no-undef

【说明】该错误是eslint报错吧。禁用eslint或者给eslint加上全局变量wx

image

【解决方法】在.eslintrc.js文件中加入以下内容;

globals: { wx: true},

1.1wepy开发小程序eslint报错error 'getApp' is not defined no-undef

【说明】该错误是eslint报错吧。禁用eslint或者给eslint加上全局变量getApp

【解决方法】在.eslintrc.js文件中加入以下内容;

globals: { getApp: true},

// all
globals: { getApp: true, wx: true},

相关文章

网友评论

      本文标题:微信小程序 - wepy问题集(实时更新)

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