feat(admin): 改善工作台和账户消耗的等待、异常与移动体验
This commit is contained in:
@@ -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]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user