main.js 608 B

12345678910111213141516171819202122232425262728293031323334
  1. // #ifndef VUE3
  2. import Vue from 'vue'
  3. import App from './App'
  4. import store from './store'
  5. import uView from '@/uni_modules/uview-ui'
  6. import request from '@/util/request.js'
  7. import utils from '@/util/util.js'
  8. Vue.prototype.$request = request
  9. Vue.prototype.$utils = utils
  10. Vue.prototype.$store = store
  11. Vue.use(uView)
  12. Vue.config.productionTip = false
  13. App.mpType = 'app'
  14. const app = new Vue({
  15. ...App
  16. })
  17. app.$mount()
  18. // #endif
  19. // #ifdef VUE3
  20. import {
  21. createSSRApp
  22. } from 'vue'
  23. import App from './App.vue'
  24. export function createApp() {
  25. const app = createSSRApp(App)
  26. return {
  27. store,
  28. ...app
  29. }
  30. }
  31. // #endif