main.js 810 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 My_listbox from './components/My_listbox';
  13. Vue.component('My_listbox', My_listbox);
  14. import My_search from './components/My_search';
  15. Vue.component('My_search', My_search);
  16. //挂载接口
  17. import {
  18. ApiModel
  19. } from './utils/api'
  20. Vue.prototype.$Http = new ApiModel();
  21. App.mpType = 'app'
  22. const app = new Vue({
  23. ...App
  24. })
  25. app.$mount()
  26. // #endif
  27. // #ifdef VUE3
  28. import {
  29. createSSRApp
  30. } from 'vue'
  31. export function createApp() {
  32. const app = createSSRApp(App)
  33. return {
  34. app
  35. }
  36. }
  37. // #endif