diff --git a/src/router/index.ts b/src/router/index.ts index 1579f29..5c930d6 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -16,6 +16,7 @@ import chatRouter from './modules/chat' import othersRouter from './modules/other' import externalLink from './modules/externalLink' import formRouter from './modules/from' +import functionPageRouter from './modules/functionPage' // 异步组件 export const asyncRoutes = [ @@ -23,8 +24,9 @@ export const asyncRoutes = [ ...echartsRouter, ...tableRouter, ...formRouter, - ...chatRouter, ...othersRouter, + ...functionPageRouter, + ...chatRouter, ...nestedRouter, ...excelRouter, ...errorRouter, diff --git a/src/router/modules/functionPage.ts b/src/router/modules/functionPage.ts index e69de29..c1bf3ea 100644 --- a/src/router/modules/functionPage.ts +++ b/src/router/modules/functionPage.ts @@ -0,0 +1,31 @@ + +/** When your routing table is too long, you can split it into small modules**/ + +import Layout from "@/layout/index.vue"; + +const functionPageRouter = [{ + path: '/function-page', + component: Layout, + redirect: '/function-page/401', + name: 'function-page', + meta: { + title: '功能页面', + icon: 'ElementPlus' + }, + children: [ + { + path: '404', + component: () => import('@/views/error/404.vue'), + name: 'function-404', + meta: { title: '404', keepAlive: true , icon: 'MenuIcon'} + }, + { + path: '403', + component: () => import('@/views/error/403.vue'), + name: 'function-403', + meta: { title: '403', keepAlive: true , icon: 'MenuIcon'} + }, + ] +}] + +export default functionPageRouter