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
4903acb4
Commit
4903acb4
authored
Jul 16, 2018
by
杨伟荣
Committed by
陈帅
Jul 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复侧边栏菜单不能动态显示的问题
parent
e3cb9b2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/components/SiderMenu/SiderMenu.js
src/components/SiderMenu/SiderMenu.js
+4
-3
No files found.
src/components/SiderMenu/SiderMenu.js
View file @
4903acb4
...
...
@@ -196,7 +196,8 @@ export default class SiderMenu extends PureComponent {
};
isMainMenu
=
key
=>
{
return
this
.
props
.
menuData
.
some
(
item
=>
key
&&
(
item
.
key
===
key
||
item
.
path
===
key
));
const
{
menuData
}
=
this
.
props
;
return
menuData
.
some
(
item
=>
key
&&
(
item
.
key
===
key
||
item
.
path
===
key
));
};
handleOpenChange
=
openKeys
=>
{
...
...
@@ -208,7 +209,7 @@ export default class SiderMenu extends PureComponent {
};
render
()
{
const
{
logo
,
collapsed
,
onCollapse
}
=
this
.
props
;
const
{
logo
,
menuData
,
collapsed
,
onCollapse
}
=
this
.
props
;
const
{
openKeys
}
=
this
.
state
;
// Don't show popup menu when it is been collapsed
const
menuProps
=
collapsed
...
...
@@ -246,7 +247,7 @@ export default class SiderMenu extends PureComponent {
selectedKeys
=
{
selectedKeys
}
style
=
{{
padding
:
'
16px 0
'
,
width
:
'
100%
'
}}
>
{
this
.
getNavMenuItems
(
this
.
props
.
menuData
)}
{
this
.
getNavMenuItems
(
menuData
)}
<
/Menu
>
<
/Sider
>
);
...
...
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