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

wepy开发小程序使用getApp().globalData保存全局数据很方便,但是会在控制台看到很多报错:“error 'getApp' is not defined no-undef”,这是eslint报错。

解决办法:在.eslintrc.js文件中加入   globals: { getApp: true }

posted @ 2018-07-13 15:25  云行月翔  阅读(1535)  评论(0编辑  收藏  举报