main.js 544 B

1234567891011121314151617181920212223242526
  1. import Vue from 'vue'
  2. import App from './App'
  3. import store from "./store/index.js"
  4. import Nothing from "components/common/nothing.vue"
  5. import $A from "common/utils/about-app.js"
  6. Vue.prototype.$store=store //挂载store
  7. Vue.prototype.$A=$A //挂载关于app
  8. //延时封装
  9. Vue.prototype.$setTimeout=function (callback=()=>{},delay) {
  10. setTimeout(()=>{
  11. return callback()
  12. },delay)
  13. }
  14. // 注册全局组件
  15. Vue.component('nothing',Nothing)
  16. Vue.config.productionTip = false
  17. App.mpType = 'app'
  18. const app = new Vue({
  19. ...App
  20. })
  21. app.$mount()