From c303ec1a23c4b1fbad4fbda9007af2147dc327e2 Mon Sep 17 00:00:00 2001 From: vben <anncwb@126.com> Date: 星期四, 03 十二月 2020 21:49:32 +0800 Subject: [PATCH] refactor: refactor route --- src/router/routes/modules/dashboard.ts | 35 +++++++++++------------------------ 1 files changed, 11 insertions(+), 24 deletions(-) diff --git a/src/router/routes/modules/dashboard.ts b/src/router/routes/modules/dashboard.ts index ba647f3..70da9aa 100644 --- a/src/router/routes/modules/dashboard.ts +++ b/src/router/routes/modules/dashboard.ts @@ -1,32 +1,19 @@ import type { AppRouteModule } from '/@/router/types'; -import { PAGE_LAYOUT_COMPONENT } from '/@/router/constant'; +import { LAYOUT } from '/@/router/constant'; const dashboard: AppRouteModule = { - layout: { - path: '/dashboard', - name: 'Dashboard', - component: PAGE_LAYOUT_COMPONENT, - redirect: '/dashboard/welcome', - meta: { - icon: 'ant-design:home-outlined', - title: 'routes.dashboard.dashboard', - }, + path: '/dashboard', + name: 'Dashboard', + component: LAYOUT, + redirect: '/dashboard/welcome', + meta: { + icon: 'ant-design:home-outlined', + title: 'routes.dashboard.dashboard', }, - - routes: [ + children: [ { - path: '/welcome', - name: 'Welcome', - component: () => import('/@/views/dashboard/welcome/index.vue'), - meta: { - title: 'routes.dashboard.welcome', - affix: true, - icon: 'ant-design:home-outlined', - }, - }, - { - path: '/workbench', + path: 'workbench', name: 'Workbench', component: () => import('/@/views/dashboard/workbench/index.vue'), meta: { @@ -34,7 +21,7 @@ }, }, { - path: '/analysis', + path: 'analysis', name: 'Analysis', component: () => import('/@/views/dashboard/analysis/index.vue'), meta: { -- Gitblit v1.8.0