正确转到字典类型页面

This commit is contained in:
sindir
2026-01-20 16:19:54 +08:00
parent 3ad32fac9f
commit 46145ff636
2 changed files with 58 additions and 128 deletions

View File

@@ -96,6 +96,32 @@ export const dynamicRoutes = [
},
],
},
// 字典类型路由(直接复制这段)
{
path: '/system/dict',
component: Layout,
alwaysShow: true,
name: 'DictType',
meta: {
title: '字典类型管理',
icon: 'list' // 图标随便选一个比如list、dict不影响跳转
},
children: [
{
path: '',
component: () => import('@/views/system/dict/index.vue'),
name: 'DictTypeList',
meta: {title: '字典类型', noCache: false}
},
{
path: 'data/:dictId?', // 带字典ID参数?表示可选
component: () => import('@/views/system/dict/data.vue'), // 你的data.vue路径
name: 'DictData',
hidden: true, // 不在侧边栏显示(子页面)
meta: {title: '字典数据', activeMenu: '/system/dict'} // 保持侧边栏高亮
}
]
},
];
// 合并常量路由和动态路由,确保所有路由都能被访问