Merge branch 'fork/bnuephjx/refactor/router-redirect'

This commit is contained in:
金毛88
2026-07-01 13:31:27 +08:00
23 changed files with 189 additions and 176 deletions

View File

@@ -64,11 +64,11 @@ const dashboardMenus = [
},
name: 'Dashboard',
path: '/dashboard',
redirect: '/analytics',
redirect: '/dashboard/analytics',
children: [
{
name: 'Analytics',
path: '/analytics',
path: 'analytics',
component: '/dashboard/analytics/index',
meta: {
affixTab: true,
@@ -77,7 +77,7 @@ const dashboardMenus = [
},
{
name: 'Workspace',
path: '/workspace',
path: 'workspace',
component: '/dashboard/workspace/index',
meta: {
title: 'page.dashboard.workspace',
@@ -96,7 +96,7 @@ const createDemosMenus = (role: 'admin' | 'super' | 'user') => {
title: 'demos.access.adminVisible',
},
name: 'AccessAdminVisibleDemo',
path: '/demos/access/admin-visible',
path: 'admin-visible',
},
super: {
component: '/demos/access/super-visible',
@@ -105,7 +105,7 @@ const createDemosMenus = (role: 'admin' | 'super' | 'user') => {
title: 'demos.access.superVisible',
},
name: 'AccessSuperVisibleDemo',
path: '/demos/access/super-visible',
path: 'super-visible',
},
user: {
component: '/demos/access/user-visible',
@@ -114,7 +114,7 @@ const createDemosMenus = (role: 'admin' | 'super' | 'user') => {
title: 'demos.access.userVisible',
},
name: 'AccessUserVisibleDemo',
path: '/demos/access/user-visible',
path: 'user-visible',
},
};
@@ -132,7 +132,7 @@ const createDemosMenus = (role: 'admin' | 'super' | 'user') => {
children: [
{
name: 'AccessDemos',
path: '/demosaccess',
path: 'access',
meta: {
icon: 'mdi:cloud-key-outline',
title: 'demos.access.backendPermissions',
@@ -141,7 +141,7 @@ const createDemosMenus = (role: 'admin' | 'super' | 'user') => {
children: [
{
name: 'AccessPageControlDemo',
path: '/demos/access/page-control',
path: 'page-control',
component: '/demos/access/index',
meta: {
icon: 'mdi:page-previous-outline',
@@ -150,7 +150,7 @@ const createDemosMenus = (role: 'admin' | 'super' | 'user') => {
},
{
name: 'AccessButtonControlDemo',
path: '/demos/access/button-control',
path: 'button-control',
component: '/demos/access/button-control',
meta: {
icon: 'mdi:button-cursor',
@@ -159,7 +159,7 @@ const createDemosMenus = (role: 'admin' | 'super' | 'user') => {
},
{
name: 'AccessMenuVisible403Demo',
path: '/demos/access/menu-visible-403',
path: 'menu-visible-403',
component: '/demos/access/menu-visible-403',
meta: {
authority: ['no-body'],

View File

@@ -14,7 +14,7 @@ const routes: RouteRecordRaw[] = [
children: [
{
name: 'Analytics',
path: '/analytics',
path: 'analytics',
component: () => import('#/views/dashboard/analytics/index.vue'),
meta: {
affixTab: true,
@@ -24,7 +24,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'Workspace',
path: '/workspace',
path: 'workspace',
component: () => import('#/views/dashboard/workspace/index.vue'),
meta: {
icon: 'carbon:workspace',

View File

@@ -18,7 +18,7 @@ const routes: RouteRecordRaw[] = [
title: $t('demos.antd'),
},
name: 'AntDesignDemos',
path: '/demos/ant-design',
path: 'ant-design',
component: () => import('#/views/demos/antd/index.vue'),
},
],

View File

@@ -27,7 +27,7 @@ const routes: RouteRecordRaw[] = [
children: [
{
name: 'VbenDocument',
path: '/vben-admin/document',
path: 'document',
component: IFrameView,
meta: {
icon: 'lucide:book-open-text',
@@ -37,7 +37,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenGithub',
path: '/vben-admin/github',
path: 'github',
component: IFrameView,
meta: {
icon: 'mdi:github',
@@ -47,7 +47,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenAntdVNext',
path: '/vben-admin/antdv-next',
path: 'antdv-next',
component: IFrameView,
meta: {
badgeType: 'dot',
@@ -58,7 +58,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenNaive',
path: '/vben-admin/naive',
path: 'naive',
component: IFrameView,
meta: {
badgeType: 'dot',
@@ -69,7 +69,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenTDesign',
path: '/vben-admin/tdesign',
path: 'tdesign',
component: IFrameView,
meta: {
badgeType: 'dot',
@@ -80,7 +80,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenElementPlus',
path: '/vben-admin/ele',
path: 'ele',
component: IFrameView,
meta: {
badgeType: 'dot',

View File

@@ -14,7 +14,7 @@ const routes: RouteRecordRaw[] = [
children: [
{
name: 'Analytics',
path: '/analytics',
path: 'analytics',
component: () => import('#/views/dashboard/analytics/index.vue'),
meta: {
affixTab: true,
@@ -24,7 +24,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'Workspace',
path: '/workspace',
path: 'workspace',
component: () => import('#/views/dashboard/workspace/index.vue'),
meta: {
icon: 'carbon:workspace',

View File

@@ -18,7 +18,7 @@ const routes: RouteRecordRaw[] = [
title: $t('demos.antd'),
},
name: 'AntDesignDemos',
path: '/demos/ant-design-next',
path: 'ant-design-next',
component: () => import('#/views/demos/antd/index.vue'),
},
],

View File

@@ -27,7 +27,7 @@ const routes: RouteRecordRaw[] = [
children: [
{
name: 'VbenDocument',
path: '/vben-admin/document',
path: 'document',
component: IFrameView,
meta: {
icon: 'lucide:book-open-text',
@@ -37,7 +37,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenGithub',
path: '/vben-admin/github',
path: 'github',
component: IFrameView,
meta: {
icon: 'mdi:github',
@@ -47,7 +47,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenAntd',
path: '/vben-admin/antd',
path: 'antd',
component: IFrameView,
meta: {
badgeType: 'dot',
@@ -58,7 +58,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenNaive',
path: '/vben-admin/naive',
path: 'naive',
component: IFrameView,
meta: {
badgeType: 'dot',
@@ -69,7 +69,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenTDesign',
path: '/vben-admin/tdesign',
path: 'tdesign',
component: IFrameView,
meta: {
badgeType: 'dot',
@@ -80,7 +80,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenElementPlus',
path: '/vben-admin/ele',
path: 'ele',
component: IFrameView,
meta: {
badgeType: 'dot',

View File

@@ -14,7 +14,7 @@ const routes: RouteRecordRaw[] = [
children: [
{
name: 'Analytics',
path: '/analytics',
path: 'analytics',
component: () => import('#/views/dashboard/analytics/index.vue'),
meta: {
affixTab: true,
@@ -24,7 +24,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'Workspace',
path: '/workspace',
path: 'workspace',
component: () => import('#/views/dashboard/workspace/index.vue'),
meta: {
icon: 'carbon:workspace',

View File

@@ -18,7 +18,7 @@ const routes: RouteRecordRaw[] = [
title: $t('demos.elementPlus'),
},
name: 'NaiveDemos',
path: '/demos/element',
path: 'element',
component: () => import('#/views/demos/element/index.vue'),
},
{
@@ -26,7 +26,7 @@ const routes: RouteRecordRaw[] = [
title: $t('demos.form'),
},
name: 'BasicForm',
path: '/demos/form',
path: 'form',
component: () => import('#/views/demos/form/basic.vue'),
},
],

View File

@@ -31,7 +31,7 @@ const routes: RouteRecordRaw[] = [
children: [
{
name: 'VbenDocument',
path: '/vben-admin/document',
path: 'document',
component: IFrameView,
meta: {
icon: 'lucide:book-open-text',
@@ -41,7 +41,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenGithub',
path: '/vben-admin/github',
path: 'github',
component: IFrameView,
meta: {
icon: 'mdi:github',
@@ -51,7 +51,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenNaive',
path: '/vben-admin/naive',
path: 'naive',
component: IFrameView,
meta: {
badgeType: 'dot',
@@ -62,7 +62,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenAntd',
path: '/vben-admin/antd',
path: 'antd',
component: IFrameView,
meta: {
badgeType: 'dot',
@@ -73,7 +73,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenAntdVNext',
path: '/vben-admin/antdv-next',
path: 'antdv-next',
component: IFrameView,
meta: {
badgeType: 'dot',
@@ -84,7 +84,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenTDesign',
path: '/vben-admin/tdesign',
path: 'tdesign',
component: IFrameView,
meta: {
badgeType: 'dot',

View File

@@ -14,7 +14,7 @@ const routes: RouteRecordRaw[] = [
children: [
{
name: 'Analytics',
path: '/analytics',
path: 'analytics',
component: () => import('#/views/dashboard/analytics/index.vue'),
meta: {
affixTab: true,
@@ -24,7 +24,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'Workspace',
path: '/workspace',
path: 'workspace',
component: () => import('#/views/dashboard/workspace/index.vue'),
meta: {
icon: 'carbon:workspace',

View File

@@ -18,7 +18,7 @@ const routes: RouteRecordRaw[] = [
title: $t('demos.naive'),
},
name: 'NaiveDemos',
path: '/demos/naive',
path: 'naive',
component: () => import('#/views/demos/naive/index.vue'),
},
{
@@ -26,7 +26,7 @@ const routes: RouteRecordRaw[] = [
title: $t('demos.table'),
},
name: 'Table',
path: '/demos/table',
path: 'table',
component: () => import('#/views/demos/table/index.vue'),
},
{
@@ -34,7 +34,7 @@ const routes: RouteRecordRaw[] = [
title: $t('demos.form'),
},
name: 'Form',
path: '/demos/form',
path: 'form',
component: () => import('#/views/demos/form/basic.vue'),
},
{
@@ -42,7 +42,7 @@ const routes: RouteRecordRaw[] = [
title: $t('demos.arrayForm'),
},
name: 'ArrayForm',
path: '/demos/array-form',
path: 'array-form',
component: () => import('#/views/demos/naive/array-form/index.vue'),
},
],

View File

@@ -31,7 +31,7 @@ const routes: RouteRecordRaw[] = [
children: [
{
name: 'VbenDocument',
path: '/vben-admin/document',
path: 'document',
component: IFrameView,
meta: {
icon: 'lucide:book-open-text',
@@ -41,7 +41,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenGithub',
path: '/vben-admin/github',
path: 'github',
component: IFrameView,
meta: {
icon: 'mdi:github',
@@ -51,7 +51,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenAntd',
path: '/vben-admin/antd',
path: 'antd',
component: IFrameView,
meta: {
badgeType: 'dot',
@@ -62,7 +62,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenAntdVNext',
path: '/vben-admin/antdv-next',
path: 'antdv-next',
component: IFrameView,
meta: {
badgeType: 'dot',
@@ -73,7 +73,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenTDesign',
path: '/vben-admin/tdesign',
path: 'tdesign',
component: IFrameView,
meta: {
badgeType: 'dot',
@@ -84,7 +84,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenElementPlus',
path: '/vben-admin/ele',
path: 'ele',
component: IFrameView,
meta: {
badgeType: 'dot',

View File

@@ -14,7 +14,7 @@ const routes: RouteRecordRaw[] = [
children: [
{
name: 'Analytics',
path: '/analytics',
path: 'analytics',
component: () => import('#/views/dashboard/analytics/index.vue'),
meta: {
affixTab: true,
@@ -24,7 +24,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'Workspace',
path: '/workspace',
path: 'workspace',
component: () => import('#/views/dashboard/workspace/index.vue'),
meta: {
icon: 'carbon:workspace',

View File

@@ -18,7 +18,7 @@ const routes: RouteRecordRaw[] = [
title: $t('demos.tdesign'),
},
name: 'TDesignDemos',
path: '/demos/tdesign',
path: 'tdesign',
component: () => import('#/views/demos/tdesign/index.vue'),
},
],

View File

@@ -27,7 +27,7 @@ const routes: RouteRecordRaw[] = [
children: [
{
name: 'VbenDocument',
path: '/vben-admin/document',
path: 'document',
component: IFrameView,
meta: {
icon: 'lucide:book-open-text',
@@ -37,7 +37,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenGithub',
path: '/vben-admin/github',
path: 'github',
component: IFrameView,
meta: {
icon: 'mdi:github',
@@ -47,7 +47,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenNaive',
path: '/vben-admin/naive',
path: 'naive',
component: IFrameView,
meta: {
badgeType: 'dot',
@@ -58,7 +58,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenAntdv',
path: '/vben-admin/antdv',
path: 'antdv',
component: IFrameView,
meta: {
badgeType: 'dot',
@@ -69,7 +69,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenAntdVNext',
path: '/vben-admin/antdv-next',
path: 'antdv-next',
component: IFrameView,
meta: {
badgeType: 'dot',
@@ -80,7 +80,7 @@ const routes: RouteRecordRaw[] = [
},
{
name: 'VbenElementPlus',
path: '/vben-admin/ele',
path: 'ele',
component: IFrameView,
meta: {
badgeType: 'dot',