refactor: 调整路由结构,使告警板块支持子路由

This commit is contained in:
yangsy
2025-12-26 18:18:34 +08:00
parent 02e29eb4f3
commit 1f23588649
3 changed files with 13 additions and 2 deletions

View File

@@ -77,9 +77,15 @@ const menuOptions: MenuOption[] = [
icon: renderIcon(HddFilled),
},
{
label: () => h(RouterLink, { to: '/alarm' }, { default: () => '设备告警' }),
label: '设备告警',
key: '/alarm',
icon: renderIcon(AlertFilled),
children: [
{
label: () => h(RouterLink, { to: '/alarm/alarm-log' }, { default: () => '设备告警记录' }),
key: '/alarm/alarm-log',
},
],
},
{
label: '系统日志',

View File

@@ -23,7 +23,12 @@ const router = createRouter({
},
{
path: 'alarm',
component: () => import('@/pages/alarm-page.vue'),
children: [
{
path: 'alarm-log',
component: () => import('@/pages/alarm-log-page.vue'),
},
],
},
{
path: 'log',