Files
scrm.antd/config/routes.ts

97 lines
3.0 KiB
TypeScript
Raw Normal View History

2023-04-07 17:38:15 +08:00
/**
2023-04-04 10:56:33 +08:00
* @name umi
* @description path,component,routes,redirect,wrappers,name,icon
* @param path path 第一种是动态参数 :id *
* @param component location path React src/pages
* @param routes layout 使
* @param redirect
* @param wrappers
* @param name menu.ts menu.xxxx name login menu.ts menu.login
* @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',
layout: false,
routes: [
{
name: 'login',
path: '/user/login',
component: './User/Login',
},
],
},
2023-04-07 17:38:15 +08:00
// {
// path: '/welcome',
// name: 'welcome',
// icon: 'smile',
// component: './Welcome',
// },
2023-04-04 10:56:33 +08:00
{
2023-04-07 17:38:15 +08:00
path: '/departments',
name: 'scrm',
2023-04-04 10:56:33 +08:00
icon: 'crown',
2023-04-07 17:38:15 +08:00
// access: 'canAdmin',
2023-04-04 10:56:33 +08:00
routes: [
{
2023-04-07 17:38:15 +08:00
path: '/departments',
redirect: '/departments/page/list',
2023-04-04 10:56:33 +08:00
},
{
2023-04-07 17:38:15 +08:00
path: '/departments/page',
name: '部门管理',
// hideInBreadcrumb: true,
// component: './Admin',
routes: [
{
path: '/departments/page',
redirect: '/departments/page/list',
},
{
name: '部门员工',
icon: 'table',
path: '/departments/page/list',
component: './DepartmentsList',
},
{
name: '聊天记录',
icon: 'table',
path: '/departments/page/list2',
component: './ChatLogs',
},
],
2023-04-04 10:56:33 +08:00
},
2023-04-07 17:38:15 +08:00
// {
// path: '/departments/sub-page2',
// name: '商品',
// // component: './TableList',
// routes: [
// {
// name: '列表',
// icon: 'table',
// path: '/departments/sub-page2/list',
// component: './TableList',
// },
// ],
// },
2023-04-04 10:56:33 +08:00
],
},
2023-04-07 17:38:15 +08:00
// {
// name: 'list.table-list',
// icon: 'table',
// path: '/list',
// component: './TableList',
// },
2023-04-04 10:56:33 +08:00
{
path: '/',
2023-04-07 17:38:15 +08:00
redirect: '/departments',
2023-04-04 10:56:33 +08:00
},
{
path: '*',
layout: false,
component: './404',
},
];