main.js 735 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // #ifndef VUE3
  2. import Vue from 'vue'
  3. import App from './App'
  4. import './composition-api'
  5. import {
  6. navigateTo,
  7. redirectTo,
  8. selectDictLabel
  9. } from '@/utils/utils.js'
  10. import {
  11. fileBasUrl
  12. } from '@/api/config.js'
  13. console.log(fileBasUrl, 'fileBasUrl')
  14. Vue.prototype.$navigateTo = navigateTo;
  15. Vue.prototype.$redirectTo = redirectTo;
  16. // 媒体文件地址
  17. Vue.prototype.$fileBasUrl = fileBasUrl;
  18. Vue.prototype.$selectDictLabel = selectDictLabel;
  19. Vue.config.productionTip = false
  20. App.mpType = 'app'
  21. const app = new Vue({
  22. ...App
  23. })
  24. app.$mount()
  25. // #endif
  26. // #ifdef VUE3
  27. import { createSSRApp } from 'vue'
  28. import App from './App.vue'
  29. export function createApp() {
  30. const app = createSSRApp(App)
  31. return {
  32. app
  33. }
  34. }
  35. // #endif