Browse Source

fix: 修复前端路由重复报错

fix-permisson
WangJunZzz 1 year ago
parent
commit
6bbbe24312
  1. 2
      .gitignore
  2. 2
      vben28/src/router/constant.ts
  3. 3
      vben28/src/router/routes/basic.ts
  4. 4
      vben28/src/router/routes/modules/tenant.ts

2
.gitignore

@ -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

2
vben28/src/router/constant.ts

@ -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');
/**

3
vben28/src/router/routes/basic.ts

@ -5,6 +5,7 @@ import {
LAYOUT,
EXCEPTION_COMPONENT,
PAGE_NOT_FOUND_NAME,
PAGE_NOT_FOUND_NAME_PATH,
} from '/@/router/constant';
// 404 on a page
@ -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',

4
vben28/src/router/routes/modules/tenant.ts

@ -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'),

Loading…
Cancel
Save