main.js 773 B

123456789101112131415161718192021222324252627282930313233343536
  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. import debounceButton from '@/components/debounce-button.vue';
  12. Vue.component('debounceButton', debounceButton);
  13. // 引入vuex
  14. const vuexStore = require("@/store/$u.mixin.js");
  15. Vue.mixin(vuexStore);
  16. // 创建对象
  17. const app = new Vue({
  18. store,
  19. ...App
  20. });
  21. // 接口集中管理
  22. import httpInstall from '@/http/install.js'
  23. Vue.use(httpInstall, app)
  24. // 公共函数
  25. import globalFunc from '@/utils/func.js'
  26. Vue.use(globalFunc, app);
  27. //挂载到Vue原型
  28. Vue.prototype.$deepClone = utils.deepClone
  29. app.$mount()