From f3942edece5b99d49db76cb73c7d17308f5810df Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Mon, 9 Feb 2026 16:47:51 +0800 Subject: [PATCH] =?UTF-8?q?refactor(router):=20=E7=A7=BB=E9=99=A4=E6=9C=AA?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84=E8=B7=AF=E7=94=B1=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 清理不再使用的 dashboard 和 vben 路由模块文件,保持路由结构整洁 --- .../src/router/routes/modules/.gitkeep | 0 .../src/router/routes/modules/dashboard.ts | 38 ------ .../src/router/routes/modules/vben.ts | 111 ------------------ 3 files changed, 149 deletions(-) create mode 100644 apps/web-antd/src/router/routes/modules/.gitkeep delete mode 100644 apps/web-antd/src/router/routes/modules/dashboard.ts delete mode 100644 apps/web-antd/src/router/routes/modules/vben.ts diff --git a/apps/web-antd/src/router/routes/modules/.gitkeep b/apps/web-antd/src/router/routes/modules/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/apps/web-antd/src/router/routes/modules/dashboard.ts b/apps/web-antd/src/router/routes/modules/dashboard.ts deleted file mode 100644 index 5254dc65..00000000 --- a/apps/web-antd/src/router/routes/modules/dashboard.ts +++ /dev/null @@ -1,38 +0,0 @@ -import type { RouteRecordRaw } from 'vue-router'; - -import { $t } from '#/locales'; - -const routes: RouteRecordRaw[] = [ - { - meta: { - icon: 'lucide:layout-dashboard', - order: -1, - title: $t('page.dashboard.title'), - }, - name: 'Dashboard', - path: '/dashboard', - children: [ - { - name: 'Analytics', - path: '/analytics', - component: () => import('#/views/dashboard/analytics/index.vue'), - meta: { - affixTab: true, - icon: 'lucide:area-chart', - title: $t('page.dashboard.analytics'), - }, - }, - { - name: 'Workspace', - path: '/workspace', - component: () => import('#/views/dashboard/workspace/index.vue'), - meta: { - icon: 'carbon:workspace', - title: $t('page.dashboard.workspace'), - }, - }, - ], - }, -]; - -export default routes; diff --git a/apps/web-antd/src/router/routes/modules/vben.ts b/apps/web-antd/src/router/routes/modules/vben.ts deleted file mode 100644 index c7f13ed9..00000000 --- a/apps/web-antd/src/router/routes/modules/vben.ts +++ /dev/null @@ -1,111 +0,0 @@ -import type { RouteRecordRaw } from 'vue-router'; - -import { - VBEN_ANTDV_NEXT_PREVIEW_URL, - VBEN_DOC_URL, - VBEN_ELE_PREVIEW_URL, - VBEN_GITHUB_URL, - VBEN_LOGO_URL, - VBEN_NAIVE_PREVIEW_URL, -} from '@vben/constants'; - -import { IFrameView } from '#/layouts'; -import { $t } from '#/locales'; - -const routes: RouteRecordRaw[] = [ - { - meta: { - badgeType: 'dot', - icon: VBEN_LOGO_URL, - order: 9998, - title: $t('demos.vben.title'), - }, - name: 'VbenProject', - path: '/vben-admin', - children: [ - { - name: 'VbenAbout', - path: '/vben-admin/about', - component: () => import('#/views/_core/about/index.vue'), - meta: { - icon: 'lucide:copyright|offline', - title: $t('demos.vben.about'), - }, - }, - { - name: 'VbenDocument', - path: '/vben-admin/document', - component: IFrameView, - meta: { - icon: 'lucide:book-open-text|offline', - link: VBEN_DOC_URL, - title: $t('demos.vben.document'), - }, - }, - { - name: 'VbenGithub', - path: '/vben-admin/github', - component: IFrameView, - meta: { - icon: 'mdi:github', - link: VBEN_GITHUB_URL, - title: 'Github', - }, - }, - { - name: 'VbenAntdVNext', - path: '/vben-admin/antdv-next', - component: IFrameView, - meta: { - badgeType: 'dot', - link: VBEN_ANTDV_NEXT_PREVIEW_URL, - title: $t('demos.vben.antdv-next'), - }, - }, - { - name: 'VbenNaive', - path: '/vben-admin/naive', - component: IFrameView, - meta: { - badgeType: 'dot', - icon: 'logos:naiveui', - link: VBEN_NAIVE_PREVIEW_URL, - title: $t('demos.vben.naive-ui'), - }, - }, - { - name: 'VbenElementPlus', - path: '/vben-admin/ele', - component: IFrameView, - meta: { - badgeType: 'dot', - icon: 'logos:element', - link: VBEN_ELE_PREVIEW_URL, - title: $t('demos.vben.element-plus'), - }, - }, - ], - }, - { - name: 'VbenAbout', - path: '/vben-admin/about', - component: () => import('#/views/_core/about/index.vue'), - meta: { - icon: 'lucide:copyright', - title: $t('demos.vben.about'), - order: 9999, - }, - }, - { - name: 'Profile', - path: '/profile', - component: () => import('#/views/_core/profile/index.vue'), - meta: { - icon: 'lucide:user', - hideInMenu: true, - title: $t('page.auth.profile'), - }, - }, -]; - -export default routes;