main.js 549 B

12345678910111213141516171819202122232425262728
  1. import App from './App'
  2. import common from '@/utils/common.js'
  3. Vue.prototype.$common =common
  4. import request from '@/utils/request.js'
  5. Vue.prototype.$http = request.http
  6. import store from './store'
  7. Vue.prototype.$store = store // 定义成全局组件
  8. // #ifndef VUE3
  9. import Vue from 'vue'
  10. Vue.config.productionTip = false
  11. App.mpType = 'app'
  12. const app = new Vue({
  13. ...App
  14. })
  15. app.$mount()
  16. // #endif
  17. // #ifdef VUE3
  18. import { createSSRApp } from 'vue'
  19. export function createApp() {
  20. const app = createSSRApp(App)
  21. return {
  22. app
  23. }
  24. }
  25. // #endif