From 1943e2339a466d7036f71c870366f50cf4a7a893 Mon Sep 17 00:00:00 2001 From: zouzhibing Date: Mon, 14 Nov 2022 22:37:06 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=F0=9F=9A=80=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 4 +++- src/router/modules/functionPage.ts | 31 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) 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