main.js 740 B

1234567891011121314151617181920212223242526272829303132
  1. import Vue from 'vue'
  2. import App from './App'
  3. import Container from "library/Container.js";
  4. import Base from "library/Base.js";
  5. import uView from '@/uni_modules/uview-ui/index.js';
  6. Vue.use(uView);
  7. //导航栏组件
  8. import headers from './components/ui-header/index.vue'
  9. Vue.component('page-head',headers)
  10. //使用伪装容器
  11. let $c = Container.getInstance();
  12. let base = new Base(Vue,$c);
  13. let store = $c.make(require("./store"),"store");
  14. Vue.prototype.$store = store; //stroe
  15. store.commit("init",Vue.prototype);
  16. Vue.prototype.base = base;
  17. //设置为 false 以阻止 vue 在启动时生成生产提示
  18. Vue.config.productionTip = false;
  19. App.mpType = 'app';
  20. const app = new Vue({
  21. store,
  22. ...App
  23. })
  24. app.$mount();