Kyun Wong
2023-05-10 afacf688250ed11466d809e3f5d43d71ef81306b
提交 | 用户 | age
e12c58 1 import type { AppRouteRecordRaw } from '/@/router/types';
V 2 import { t } from '/@/hooks/web/useI18n';
237e65 3 import {
4   REDIRECT_NAME,
5   LAYOUT,
6   EXCEPTION_COMPONENT,
7   PAGE_NOT_FOUND_NAME,
8 } from '/@/router/constant';
e12c58 9
V 10 // 404 on a page
11 export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = {
12   path: '/:path(.*)*',
237e65 13   name: PAGE_NOT_FOUND_NAME,
e12c58 14   component: LAYOUT,
V 15   meta: {
16     title: 'ErrorPage',
17     hideBreadcrumb: true,
913c22 18     hideMenu: true,
e12c58 19   },
V 20   children: [
21     {
22       path: '/:path(.*)*',
237e65 23       name: PAGE_NOT_FOUND_NAME,
e12c58 24       component: EXCEPTION_COMPONENT,
V 25       meta: {
26         title: 'ErrorPage',
27         hideBreadcrumb: true,
237e65 28         hideMenu: true,
e12c58 29       },
V 30     },
31   ],
32 };
33
34 export const REDIRECT_ROUTE: AppRouteRecordRaw = {
35   path: '/redirect',
36   component: LAYOUT,
2dd3d8 37   name: 'RedirectTo',
e12c58 38   meta: {
V 39     title: REDIRECT_NAME,
40     hideBreadcrumb: true,
913c22 41     hideMenu: true,
e12c58 42   },
V 43   children: [
44     {
afacf6 45       path: '/redirect/:path(.*)/:_redirect_type(.*)/:_origin_params(.*)',
e12c58 46       name: REDIRECT_NAME,
V 47       component: () => import('/@/views/sys/redirect/index.vue'),
48       meta: {
49         title: REDIRECT_NAME,
50         hideBreadcrumb: true,
51       },
52     },
53   ],
54 };
55
56 export const ERROR_LOG_ROUTE: AppRouteRecordRaw = {
57   path: '/error-log',
7dce50 58   name: 'ErrorLog',
e12c58 59   component: LAYOUT,
341bd6 60   redirect: '/error-log/list',
e12c58 61   meta: {
V 62     title: 'ErrorLog',
63     hideBreadcrumb: true,
341bd6 64     hideChildrenInMenu: true,
e12c58 65   },
V 66   children: [
67     {
68       path: 'list',
7dce50 69       name: 'ErrorLogList',
e12c58 70       component: () => import('/@/views/sys/error-log/index.vue'),
V 71       meta: {
72         title: t('routes.basic.errorLogList'),
73         hideBreadcrumb: true,
341bd6 74         currentActiveMenu: '/error-log',
e12c58 75       },
V 76     },
77   ],
78 };