Skip to content

Commit

Permalink
fix: 修复前端路由重复报错
Browse files Browse the repository at this point in the history
  • Loading branch information
WangJunZzz committed Dec 6, 2024
1 parent afcdd51 commit 6bbbe24
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ bld/
[Bb]in/
[Oo]bj/
[Ll]og/

.DS_Store
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
Expand Down
2 changes: 2 additions & 0 deletions vben28/src/router/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export const PARENT_LAYOUT_NAME = 'ParentLayout';

export const PAGE_NOT_FOUND_NAME = 'PageNotFound';

export const PAGE_NOT_FOUND_NAME_PATH = 'PageNotFoundPath';

export const EXCEPTION_COMPONENT = () => import('/@/views/sys/exception/Exception.vue');

/**
Expand Down
3 changes: 2 additions & 1 deletion vben28/src/router/routes/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
LAYOUT,
EXCEPTION_COMPONENT,
PAGE_NOT_FOUND_NAME,
PAGE_NOT_FOUND_NAME_PATH,
} from '/@/router/constant';

// 404 on a page
Expand All @@ -20,7 +21,7 @@ export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = {
children: [
{
path: '/:path(.*)*',
name: PAGE_NOT_FOUND_NAME,
name: PAGE_NOT_FOUND_NAME_PATH,
component: EXCEPTION_COMPONENT,
meta: {
title: 'ErrorPage',
Expand Down
4 changes: 2 additions & 2 deletions vben28/src/router/routes/modules/tenant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const tenant: AppRouteModule = {
},
children: [
{
path: 'Tenant',
name: 'Tenant',
path: 'Page',
name: 'TenantPage',
component: () => import('/@/views/tenants/Tenant.vue'),
meta: {
title: t('routes.tenant.tenantList'),
Expand Down

0 comments on commit 6bbbe24

Please sign in to comment.