main.js 576 B

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