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

@@ -12,13 +12,14 @@ const Settings: ProLayoutProps & {
colorPrimary: "#1890ff",
layout: "mix",
contentWidth: "Fluid",
fixedHeader: false,
fixedHeader: true,
fixSiderbar: true,
colorWeak: false,
title: "tashow - 管理后台",
title: "百业到家云控台",
pwa: true,
logo: "https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg",
logo: "/logo.svg",
iconfontUrl: "",
splitMenus: true,
token: {
// 参见ts声明demo 见文档通过token 修改样式
//https://procomponents.ant.design/components/layout#%E9%80%9A%E8%BF%87-token-%E4%BF%AE%E6%94%B9%E6%A0%B7%E5%BC%8F

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: "*",
},
];