main.js 418 B

1234567891011121314151617181920212223242526
  1. import App from './App'
  2. import store from './store'
  3. import api from '@/common/api.js'
  4. Vue.prototype.$api = api
  5. // #ifndef VUE3
  6. import Vue from 'vue'
  7. Vue.config.productionTip = false
  8. App.mpType = 'app'
  9. const app = new Vue({
  10. ...App,
  11. store
  12. })
  13. app.$mount()
  14. // #endif
  15. // #ifdef VUE3
  16. import { createSSRApp } from 'vue'
  17. export function createApp() {
  18. const app = createSSRApp(App)
  19. return {
  20. app
  21. }
  22. }
  23. // #endif