Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
32918e44
Commit
32918e44
authored
Mar 14, 2019
by
拷钉
Committed by
陈帅
Mar 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复:有多个layout时,如果其中一个layout中没有routes,将发收到另一个layout的菜单 (#3724)
parent
3708b6f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
src/models/menu.js
src/models/menu.js
+6
-0
No files found.
src/models/menu.js
View file @
32918e44
...
...
@@ -8,6 +8,9 @@ const { check } = Authorized;
// Conversion router to menu.
function
formatter
(
data
,
parentAuthority
,
parentName
)
{
if
(
!
data
)
{
return
undefined
;
}
return
data
.
map
(
item
=>
{
if
(
!
item
.
name
||
!
item
.
path
)
{
...
...
@@ -75,6 +78,9 @@ const filterMenuData = menuData => {
* @param {Object} menuData 菜单配置
*/
const
getBreadcrumbNameMap
=
menuData
=>
{
if
(
!
menuData
)
{
return
{};
}
const
routerMap
=
{};
const
flattenMenuData
=
data
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment