微信小程序引入模块,App.js

创建一个模块 utils/appConfig.js
1 | const appConfig = { |
导入创建的模块使用 其他 .js 文件内
1 | import appConfig from '../../../utils/appConfig.js'; |
获取 App.js
1 | //app.js |
1 | let app = getApp(); |
- Post title:微信小程序引入模块,App.js
- Post author:xxxixxxx
- Create time:2021-01-14 15:05:00
- Post link:https://xxxixxx.github.io/2021/01/14/600-微信小程序-引入模块/
- Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.
Comments