main.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import 'whatwg-fetch'
  2. import 'custom-event-polyfill'
  3. import 'core-js/stable/promise'
  4. import 'core-js/stable/symbol'
  5. import 'core-js/stable/string/starts-with'
  6. import 'core-js/web/url'
  7. import Vue from 'vue'
  8. import App from './App.vue'
  9. import router from './router'
  10. import store from './store'
  11. import httpServer from "./libs/axios"
  12. import ElementUI from 'element-ui';
  13. import 'element-ui/lib/theme-chalk/index.css';
  14. Vue.use(ElementUI);
  15. Vue.prototype.$get = httpServer.get;
  16. Vue.prototype.$post = httpServer.post;
  17. import { registerMicroApps, start } from 'qiankun'
  18. Vue.config.productionTip = false
  19. new Vue({
  20. router,
  21. store,
  22. render: h => h(App)
  23. }).$mount("#app");
  24. import { getAll } from '@/libs/micros'
  25. console.log(getAll())
  26. registerMicroApps([
  27. {
  28. name: 'app-vue-hash',
  29. entry: 'http://localhost:8081',
  30. container: '#appContainer',
  31. activeRule: '/main/app-vue-hash',
  32. props: { data: { store, router } }
  33. },
  34. {
  35. name: 'fjhxCloudVue',
  36. entry: 'http://localhost:1777',
  37. container: '#appContainer',
  38. activeRule: '/main/fjhxCloudVue',
  39. props: { data: { store, router } }
  40. },
  41. {
  42. name: 'iotPlatformRoom',
  43. entry: 'http://localhost:1888',
  44. container: '#appContainer',
  45. activeRule: '/main/iotPlatformRoom',
  46. props: { data: { store, router } }
  47. },
  48. {
  49. name: 'canvas',
  50. entry: 'http://localhost:8080',
  51. container: '#appContainer',
  52. activeRule: '/main/canvas',
  53. props: { data: store }
  54. },
  55. ]);
  56. start();