Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
EcomWeb
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
jiaxing.zhou
2025-02-24 15:51:13 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3c9843728d668fb81f650f89ed54dc2dcd47b4f3
3c984372
1 parent
2311f9ca
feat(权限管理): 屏蔽包含 'summary' 的路由
- 恢复之前注释掉的代码,过滤掉路径中包含 'summary' 的路由 -优化代码格式,提高可读性
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
src/store/modules/permission.js
src/store/modules/permission.js
View file @
3c98437
...
...
@@ -64,10 +64,10 @@ const permission = {
// 遍历后台传来的路由字符串,转换为组件对象
function
filterAsyncRouter
(
asyncRouterMap
,
lastRouter
=
false
,
type
=
false
)
{
return
asyncRouterMap
.
filter
(
route
=>
{
//
//
屏蔽包含 summary 的路由
//
if (route.path.includes('summary')) {
//
return false;
//
}
// 屏蔽包含 summary 的路由
if
(
route
.
path
.
includes
(
'summary'
))
{
return
false
;
}
if
(
type
&&
route
.
children
)
{
route
.
children
=
filterChildren
(
route
.
children
)
}
...
...
Please
register
or
login
to post a comment