main.js 667 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import App from './App'
  2. // #ifndef VUE3
  3. import Vue from 'vue'
  4. Vue.config.productionTip = false;
  5. import uView from '@/uni_modules/uview-ui'
  6. Vue.use(uView)
  7. import cuCustom from './colorui/components/cu-custom.vue'
  8. Vue.component('cu-custom',cuCustom)
  9. //挂载接口
  10. import {
  11. ApiModel
  12. } from './utils/api'
  13. Vue.prototype.$Http = new ApiModel();
  14. App.mpType = 'app'
  15. const app = new Vue({
  16. ...App
  17. })
  18. app.$mount()
  19. // #endif
  20. // #ifdef VUE3
  21. import {
  22. createSSRApp
  23. } from 'vue'
  24. import cuCustom from './colorui/components/cu-custom.vue'
  25. Vue.component('cu-custom', cuCustom)
  26. export function createApp() {
  27. const app = createSSRApp(App)
  28. return {
  29. app
  30. }
  31. }
  32. // #endif