task-8(壳层/路由): 实现业务域路由注册表
新增 src/router/routes.ts:adminPages 登记业务域页面(account 首批),routeOf 生成 路由记录,validateAdminPages 校验路径唯一/相对/含 title/load;router/index.ts 改 消费 adminRouteRecords,移除内联懒加载与路径字面量。
This commit is contained in:
@@ -3,6 +3,7 @@ import type { AdminMenuNode } from '@/types/admin'
|
||||
import AdminLayout from '@/layout/AdminLayout.vue'
|
||||
import { useAdminSessionStore } from '@/stores/admin-session'
|
||||
import { APP_BASE_PATH } from '@/config/app'
|
||||
import { adminRouteRecords } from './routes'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(APP_BASE_PATH),
|
||||
@@ -10,11 +11,7 @@ const router = createRouter({
|
||||
{
|
||||
path: '/',
|
||||
component: AdminLayout,
|
||||
children: [
|
||||
{ path: 'account/users', component: () => import('@/pages/account/UsersPage.vue'), meta: { menuKey: 'admin_users', title: '用户管理' } },
|
||||
{ path: 'account/menus', component: () => import('@/pages/account/MenusPage.vue'), meta: { menuKey: 'admin_columns', title: '菜单管理' } },
|
||||
{ path: 'account/groups', component: () => import('@/pages/account/GroupsPage.vue'), meta: { menuKey: 'admin_group_manage', title: '数据权限分组' } },
|
||||
],
|
||||
children: adminRouteRecords,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user