main.js 611 B

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