task-9(壳层/路由): 实现路由 meta 菜单 key 约定与 RouteMeta 类型增强
新增 src/types/vue-router.d.ts 模块增强(RouteMeta.title/menuKey),meta.ts 提供 metaMenuKey/命名校验,router 守卫改类型化访问去掉 as cast,AdminLayout 标题同步 去 cast;校验首批注册表 menuKey 合规。
This commit is contained in:
@@ -15,7 +15,7 @@ const collapsed = ref(false)
|
||||
const activePath = computed(() => route.path)
|
||||
const menuEntries = computed(() => toSidebarEntries(session.menuTree))
|
||||
const openedKeys = computed(() => groupKeysForActive(menuEntries.value, route.path))
|
||||
const pageTitle = computed(() => pageTitleOf(route.meta.title as string | undefined))
|
||||
const pageTitle = computed(() => pageTitleOf(route.meta.title))
|
||||
const userVm = computed(() => topbarUserOf(session.user))
|
||||
const logoUrl = joinAdminPath('assets', 'logo.jpg')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user