refactor(projects): 完善路由配置

This commit is contained in:
Soybean
2021-09-14 01:31:29 +08:00
parent 1dcdcdc485
commit ab77d58e46
24 changed files with 441 additions and 301 deletions

View File

@ -1,4 +1,5 @@
export { ContentType, EnumDataType, EnumLoginModule } from './common';
export { EnumAnimate } from './animate';
export { EnumNavMode, EnumNavTheme } from './theme';
export { EnumRoutePaths } from './route';
export { EnumRoutePath, EnumRouteTitle } from './route';
export { EnumStorageKey } from './storage';

View File

@ -1,12 +1,32 @@
export enum EnumRoutePaths {
export enum EnumRoutePath {
'root' = '/',
'system' = '/system',
'login' = '/login',
'not-found' = '/exception/404',
'no-permission' = '/exception/403',
'service-error' = '/exception/500',
'not-found' = '/404',
'no-permission' = '/403',
'service-error' = '/500',
// 自定义路由
'dashboard' = '/dashboard',
'dashboard-analysis' = '/dashboard/analysis',
'dashboard-workbench' = '/dashboard/workbench',
'exception-403' = '/exception/e403',
'exception-404' = '/exception/e404',
'exception-500' = '/exception/e500'
'exception' = '/exception',
'exception-403' = '/exception/403',
'exception-404' = '/exception/404',
'exception-500' = '/exception/500'
}
export enum EnumRouteTitle {
'root' = 'root',
'system' = '系统',
'login' = '登录',
'not-found' = '未找到',
'no-permission' = '无权限',
'service-error' = '服务器错误',
'dashboard' = '仪表盘',
'dashboard-analysis' = '分析页',
'dashboard-workbench' = '工作台',
'exception' = '异常页',
'exception-403' = '异常页-403',
'exception-404' = '异常页-404',
'exception-500' = '异常页-500'
}

6
src/enum/storage.ts Normal file
View File

@ -0,0 +1,6 @@
export enum EnumStorageKey {
/** 用户token */
'token' = '__TOKEN__',
/** 用户信息 */
'user-info' = '__USER_INFO__'
}