main.js 1.1 KB

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