main.js 660 B

123456789101112131415161718192021222324252627282930313233
  1. import Vue from 'vue'
  2. import App from './App'
  3. import store from '@/store';
  4. import * as utils from '@/utils/deepClone'
  5. // 挂载到Vue原型
  6. Vue.config.productionTip = false;
  7. App.mpType = 'app';
  8. // 引入全局uView
  9. import uView from 'uview-ui'
  10. Vue.use(uView)
  11. // 引入vuex
  12. const vuexStore = require("@/store/$u.mixin.js");
  13. Vue.mixin(vuexStore);
  14. // 创建对象
  15. const app = new Vue({
  16. store,
  17. ...App
  18. });
  19. // 接口集中管理
  20. import httpInstall from '@/http/install.js'
  21. Vue.use(httpInstall, app)
  22. // 公共函数
  23. import globalFunc from '@/utils/func.js'
  24. Vue.use(globalFunc, app);
  25. //挂载到Vue原型
  26. Vue.prototype.$deepClone = utils.deepClone
  27. app.$mount()