功能:新增云管API与Web控制台并完成现场接入

This commit is contained in:
songyiming committed 2026-11-09 17:54:52 +08:00
1 parent 18a9ce995d
commit 3fb7b4da8c
79 files changed
+17367 -3

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/dist/index.css'
import './styles/tokens.css'
import App from './App.vue'
import { router } from './router'
import { useAuth } from './stores/auth'
import { usePlatform } from './stores/platform'
async function start() {
if (import.meta.env.DEV && import.meta.env.VITE_API_MODE === 'mock') {
const { worker } = await import('./mocks/browser')
await worker.start({ onUnhandledRequest: 'bypass' })
}
const app = createApp(App); app.use(createPinia()); app.use(router); app.use(ElementPlus, { locale: zhCn })
window.addEventListener('vdi:unauthorized', () => { useAuth().clear(); usePlatform().clear(); if (router.currentRoute.value.path !== '/login') void router.replace('/login') })
await router.isReady(); app.mount('#app')
}
void start()