码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2018-07-13 16:22:49      阅读:1084      评论:0      收藏:0      [点我收藏+]

标签:int   img   err   bsp   fine   data   inf   bubuko   global   

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

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

技术分享图片

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

标签:int   img   err   bsp   fine   data   inf   bubuko   global   

原文地址:https://www.cnblogs.com/sgqwjr/p/9305204.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!