| | |
| | | import { createApp, watchEffect } from 'vue'; |
| | | import VueDOMPurifyHTML from 'vue-dompurify-html'; |
| | | |
| | | import { registerAccessDirective } from './packages\effects\access\src'; |
| | | import { registerLoadingDirective } from './packages\effects\common-ui\src\loading'; |
| | | import { preferences } from './packages\preferences\src'; |
| | | import { initStores } from './packages\stores\src'; |
| | | import { registerAccessDirective } from './packages/effects/access/src'; |
| | | import { registerLoadingDirective } from './packages/effects/common-ui/src/components/loading'; |
| | | import { preferences } from './packages/preferences/src'; |
| | | import { initStores } from './packages/stores/src'; |
| | | import './packages/styles/src'; |
| | | import './packages/styles/src/antd'; |
| | | import './packages/styles/src/antd/index.css'; |
| | | |
| | | import { useTitle } from '@vueuse/core'; |
| | | |
| | |
| | | registerAccessDirective(app); |
| | | |
| | | // 初始化 tippy |
| | | const { initTippy } = await import('./packages\effects\common-ui\src\tippy'); |
| | | const { initTippy } = await import('./packages/effects/common-ui/src/components/tippy'); |
| | | initTippy(app); |
| | | |
| | | // 配置路由及路由守卫 |
| | |
| | | setupFormCreate(app); |
| | | |
| | | // 配置Motion插件 |
| | | const { MotionPlugin } = await import('./packages\effects\plugins\src\motion'); |
| | | const { MotionPlugin } = await import('./packages/effects/plugins/src/motion'); |
| | | app.use(MotionPlugin); |
| | | |
| | | // 动态更新标题 |
| | |
| | | if (preferences.app.dynamicTitle) { |
| | | const routeTitle = router.currentRoute.value.meta?.title; |
| | | const pageTitle = |
| | | (routeTitle ? `${$t(routeTitle)} - ` : '') + preferences.app.name; |
| | | (routeTitle ? `${$t(routeTitle)} - ` : '') + |
| | | preferences.copyright.companyName; |
| | | useTitle(pageTitle); |
| | | } |
| | | }); |