refactor: dynamic routes

This commit is contained in:
jialin
2026-05-08 09:33:16 +08:00
committed by jialin
parent 4be5fb4d3d
commit f08d5c904c
8 changed files with 8 additions and 309 deletions
+3
View File
@@ -0,0 +1,3 @@
// Identity hook for build-time route extensions. Tooling may overwrite
// this file to inject additional routes; the original is restored on cleanup.
export const applyRouteExtensions = <T>(base: T): T => base;
+4 -11
View File
@@ -1,6 +1,7 @@
import { keepAliveRoutes } from './keep-alive';
import { applyRouteExtensions } from './routes.extensions';
export default [
const baseRoutes = [
{
name: 'dashboard',
path: '/dashboard',
@@ -312,16 +313,6 @@ export default [
defaultIcon: 'icon-key',
component: './api-keys'
},
{
name: 'settings',
path: '/settings',
key: 'settings',
hideInMenu: true,
selectedIcon: 'icon-settings-filled',
icon: 'icon-settings',
defaultIcon: 'icon-settings',
component: './settings'
},
{
name: 'profile',
path: '/profile',
@@ -346,3 +337,5 @@ export default [
component: './404'
}
];
export default applyRouteExtensions(baseRoutes);