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
P
pro-blocks
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
pro-blocks
Commits
4bec5248
Commit
4bec5248
authored
May 17, 2018
by
此去
Committed by
陈帅
May 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix typo
`getMeunMatchKeys` => `getMenuMatchKeys`
parent
e26e375d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/components/SiderMenu/SiderMenu.js
src/components/SiderMenu/SiderMenu.js
+3
-3
No files found.
src/components/SiderMenu/SiderMenu.js
View file @
4bec5248
...
@@ -42,7 +42,7 @@ export const getFlatMenuKeys = menu =>
...
@@ -42,7 +42,7 @@ export const getFlatMenuKeys = menu =>
* @param flatMenuKeys: [/abc, /abc/:id, /abc/:id/info]
* @param flatMenuKeys: [/abc, /abc/:id, /abc/:id/info]
* @param paths: [/abc, /abc/11, /abc/11/info]
* @param paths: [/abc, /abc/11, /abc/11/info]
*/
*/
export
const
getMe
un
MatchKeys
=
(
flatMenuKeys
,
paths
)
=>
export
const
getMe
nu
MatchKeys
=
(
flatMenuKeys
,
paths
)
=>
paths
paths
.
reduce
((
matchKeys
,
path
)
=>
(
.
reduce
((
matchKeys
,
path
)
=>
(
matchKeys
.
concat
(
matchKeys
.
concat
(
...
@@ -72,7 +72,7 @@ export default class SiderMenu extends PureComponent {
...
@@ -72,7 +72,7 @@ export default class SiderMenu extends PureComponent {
*/
*/
getDefaultCollapsedSubMenus
(
props
)
{
getDefaultCollapsedSubMenus
(
props
)
{
const
{
location
:
{
pathname
}
}
=
props
||
this
.
props
;
const
{
location
:
{
pathname
}
}
=
props
||
this
.
props
;
return
getMe
un
MatchKeys
(
this
.
flatMenuKeys
,
urlToList
(
pathname
));
return
getMe
nu
MatchKeys
(
this
.
flatMenuKeys
,
urlToList
(
pathname
));
}
}
/**
/**
* 判断是否是http链接.返回 Link 或 a
* 判断是否是http链接.返回 Link 或 a
...
@@ -161,7 +161,7 @@ export default class SiderMenu extends PureComponent {
...
@@ -161,7 +161,7 @@ export default class SiderMenu extends PureComponent {
// Get the currently selected menu
// Get the currently selected menu
getSelectedMenuKeys
=
()
=>
{
getSelectedMenuKeys
=
()
=>
{
const
{
location
:
{
pathname
}
}
=
this
.
props
;
const
{
location
:
{
pathname
}
}
=
this
.
props
;
return
getMe
un
MatchKeys
(
this
.
flatMenuKeys
,
urlToList
(
pathname
));
return
getMe
nu
MatchKeys
(
this
.
flatMenuKeys
,
urlToList
(
pathname
));
};
};
// conversion Path
// conversion Path
// 转化路径
// 转化路径
...
...
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