feat: 动态路由

This commit is contained in:
2025-09-12 15:37:07 +08:00
parent 2bb11b49fe
commit e42e1c01fb
14 changed files with 321 additions and 118 deletions

View File

@@ -10,6 +10,7 @@
* @param icon 配置路由的图标,取值参考 https://ant.design/components/icon-cn 注意去除风格后缀和大小写,如想要配置图标为 <StepBackwardOutlined /> 则取值应为 stepBackward 或 StepBackward如想要配置图标为 <UserOutlined /> 则取值应为 user 或者 User
* @doc https://umijs.org/docs/guides/routes
*/
export default [
{
path: "/user",
@@ -28,6 +29,24 @@ export default [
icon: "smile",
component: "./Welcome",
},
// {
// path: "/system1",
// name: "system1",
// icon: "smile",
// routes: [
// {
// name: "tenant",
// path: "/system1/tenant",
// routes: [
// {
// name: "package",
// path: "/system1/tenant/package",
// component: "system/tenant/package",
// },
// ],
// },
// ],
// },
{
path: "/admin",
name: "admin",
@@ -58,6 +77,6 @@ export default [
{
component: "404",
layout: false,
path: "./*",
path: "*",
},
];