main.js 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. import Vue from 'vue'
  2. import App from './App'
  3. import http from './utils/http.js'
  4. import utils from './utils/utils.js'
  5. import noNone from './components/no-none.vue'
  6. import loading from './components/load.vue'
  7. import httpUpload from './utils/http-upload.js'
  8. import store from './store/index.js'
  9. import model from './components/model.vue'
  10. import util from '@/utils/util.js'
  11. import clickThrottle from '@/utils/clickThrottle.js'
  12. Vue.prototype.$util = util
  13. import api from '@/utils/api.js'
  14. Vue.prototype.$api = api
  15. import share from '@/utils/share.js'
  16. Vue.mixin(share)
  17. Vue.component('model',model)
  18. Vue.component('no-none',noNone)
  19. Vue.component('loading',loading)
  20. Vue.prototype.$http = http;
  21. Vue.prototype.$utils = utils;
  22. Vue.prototype.Upload = httpUpload;
  23. Vue.prototype.clickThrottle = clickThrottle;
  24. Vue.config.productionTip = false
  25. import pageBtmBar from './components/page-btm-bar/page-btm-bar.vue'
  26. Vue.component('page-btm-bar',pageBtmBar)
  27. Vue.prototype.$store = store
  28. App.mpType = 'app'
  29. Vue.prototype.bus = new Vue() //全局的事件总线对象
  30. const app = new Vue({
  31. ...App
  32. })
  33. app.$mount()