main.js 498 B

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