import { createApp } from 'vue' import App from './App.vue' import 'tailwindcss/tailwind.css' import 'element-plus/dist/index.css' import '@/styles/index.less' import router from './router' import '@lanchenfe/lcfeui/style.css' // import '@/router/router.hooks' import store from './store' import lcUi from '@lanchenfe/lcfeui' import { kebabCase, upperFirst, camelCase } from 'lodash' const app = createApp(App) app.use(router) app.use(store).use(lcUi) app.mount('#small-office-admin') if (window.__MICRO_APP_NAME__) { const eventObject: any = 'eventCenterFor' + upperFirst(camelCase(window.__MICRO_APP_NAME__)) const unmount = function() { app.unmount() window.removeEventListener('unmount-' + window.__MICRO_APP_NAME__, unmount) eventObject?.clearDataListener() } window.addEventListener('unmount-' + window.window.__MICRO_APP_NAME__, unmount, false) }