main.js 697 B

123456789101112131415161718192021222324252627
  1. import Vue from "vue";
  2. import App from "./App";
  3. import store from "./store";
  4. import * as Db from "./config/db.js"; //缓存操作
  5. import * as Util from "./config/util.js"; //通用方法
  6. import uView from "uview-ui";
  7. import indexMixin from "./mixin";
  8. import Loading from "./components/loadingAll/loadingAll.vue";
  9. Vue.use(uView);
  10. //请求加载组件
  11. //组件挂载到全局,方便每个页面使用
  12. Vue.component("Loading", Loading);
  13. Vue.config.productionTip = false;
  14. Vue.prototype.$store = store;
  15. Vue.prototype.$db = Db;
  16. Vue.prototype.$util = Util;
  17. Vue.prototype.$global = App.globalData;
  18. App.mpType = "app";
  19. Vue.mixin(indexMixin);
  20. const app = new Vue({
  21. ...App,
  22. store,
  23. });
  24. app.$mount();