main.js 1005 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. import timeHorizon from './components/timeHorizon'
  12. Vue.component('time-horizon', timeHorizon)
  13. import controlItem from "./control/modules/controlItem.vue"
  14. Vue.component('control-item', controlItem)
  15. //自定义组件
  16. import My_listbox from './components/My_listbox';
  17. Vue.component('My_listbox', My_listbox);
  18. import My_search from './components/My_search';
  19. Vue.component('My_search', My_search);
  20. //挂载接口
  21. import {
  22. ApiModel
  23. } from './utils/api'
  24. Vue.prototype.$Http = new ApiModel();
  25. App.mpType = 'app'
  26. const app = new Vue({
  27. ...App
  28. })
  29. app.$mount()
  30. // #endif
  31. // #ifdef VUE3
  32. import {
  33. createSSRApp
  34. } from 'vue'
  35. export function createApp() {
  36. const app = createSSRApp(App)
  37. return {
  38. app
  39. }
  40. }
  41. // #endif