feat(admin): 改善工作台和账户消耗的等待、异常与移动体验

This commit is contained in:
2026-12-01 20:01:41 +08:00
parent f02d47468b
commit 4101b11aaf
8 changed files with 893 additions and 185 deletions
+5 -3
View File
@@ -78,9 +78,11 @@ export function createRouteRecord(route: any, firstRoute: boolean): RouteRecordR
export function loadRouteView(component: string) {
try {
const normalizedComponent = normalizeMenuPath(component)
const key = Object.keys(modules).find((key) => {
return key.includes(`/${normalizedComponent}.vue`)
})
// Menus store paths relative to views/. A suffix alone can open a different
// authorized page, e.g. assistant_service/workbench/index instead of workbench/index.
const exact = `/src/views/${normalizedComponent}.vue`
if (Object.hasOwn(modules, exact)) return modules[exact]
const key = Object.keys(modules).find(key => key.endsWith(`/${normalizedComponent}.vue`))
if (key) {
return modules[key]
}