feat(admin): 增加启动与导航反馈并保护工作标签状态

This commit is contained in:
2026-12-01 20:01:40 +08:00
parent d8a16b0778
commit f02d47468b
22 changed files with 869 additions and 141 deletions
+15 -3
View File
@@ -6,8 +6,20 @@ import { createApp } from 'vue'
import App from './App.vue'
import install from './install'
import router from './router'
const app = createApp(App)
async function start() {
const app = createApp(App)
app.use(install)
// The static boot panel remains in place through auth redirects and lazy route imports.
await router.isReady()
app.mount('#app')
document.getElementById('admin-boot')?.remove()
window.dispatchEvent(new Event('admin:mounted'))
}
app.use(install)
app.mount('#app')
start().catch(error => {
const panel = document.getElementById('admin-boot')
if (panel) panel.dataset.state = 'error'
console.error('管理后台启动失败:', error)
})