feat(admin): 增加启动与导航反馈并保护工作标签状态
This commit is contained in:
+15
-3
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user