import 'virtual:svg-icons-register' import 'element-plus/dist/index.css' import 'element-plus/theme-chalk/dark/css-vars.css' import '@/styles/index.scss' import '@/install/plugins/echart' import { createApp } from 'vue' import ElementPlus from 'element-plus' import installIcons from '@/install/plugins/element' import perms from '@/install/directives/perms' import store from '@/stores' import useAppStore from '@/stores/modules/app' import useUserStore from './user' import Root from '../local-preview/Root.vue' import router from './router' import mark from '../local-preview/preview-mark-art.svg' const app=createApp(Root);app.use(store);app.use(ElementPlus);installIcons(app);app.directive('perms',perms) useAppStore().$patch({configFetchAttempted:true,config:{web_name:'甄养堂管理后台',web_logo:mark}}) window.addEventListener('live-readonly:session-ended',()=>{ if(useUserStore().ready){useUserStore().$reset(); location.replace('/admin/login')} }) // A browser back/forward cache must not resurrect a signed-out / expired clinical view. window.addEventListener('pageshow',e=>{if(e.persisted)location.replace('/admin/login')}) app.use(router);router.isReady().then(()=>app.mount('#app'))