main.js 397 B

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