mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-23 23:59:19 +08:00
fix: 添加ignoreAccess标记到个人信息路由,确保无需菜单权限即可访问
This commit is contained in:
@@ -24,6 +24,7 @@ const externalRoutes: RouteRecordRaw[] = [];
|
||||
* 无需走权限验证(会一直显示在菜单中) */
|
||||
const routes: RouteRecordRaw[] = [
|
||||
...coreRoutes,
|
||||
...staticRoutes,
|
||||
...externalRoutes,
|
||||
fallbackNotFoundRoute,
|
||||
];
|
||||
@@ -31,6 +32,6 @@ const routes: RouteRecordRaw[] = [
|
||||
/** 基本路由列表,这些路由不需要进入权限拦截 */
|
||||
const coreRouteNames = traverseTreeValues(coreRoutes, (route) => route.name);
|
||||
|
||||
/** 有权限校验的路由列表,包含动态路由和静态路由 */
|
||||
const accessRoutes = [...dynamicRoutes, ...staticRoutes];
|
||||
/** 有权限校验的路由列表,包含动态路由 */
|
||||
const accessRoutes = [...dynamicRoutes];
|
||||
export { accessRoutes, coreRouteNames, routes };
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
/**
|
||||
* 静态路由 - 不需要权限验证的路由
|
||||
* 静态路由 - 不需要权限验证的路由(用于不需要菜单权限但需要登录的页面)
|
||||
*/
|
||||
const staticRoutes: RouteRecordRaw[] = [
|
||||
{
|
||||
@@ -12,6 +12,7 @@ const staticRoutes: RouteRecordRaw[] = [
|
||||
icon: 'lucide:user',
|
||||
title: '个人信息',
|
||||
hideInMenu: true,
|
||||
ignoreAccess: true,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user