Commit 4bec5248 authored by 此去's avatar 此去 Committed by 陈帅

fix typo

`getMeunMatchKeys` => `getMenuMatchKeys`
parent e26e375d
...@@ -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 getMeunMatchKeys = (flatMenuKeys, paths) => export const getMenuMatchKeys = (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 getMeunMatchKeys(this.flatMenuKeys, urlToList(pathname)); return getMenuMatchKeys(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 getMeunMatchKeys(this.flatMenuKeys, urlToList(pathname)); return getMenuMatchKeys(this.flatMenuKeys, urlToList(pathname));
}; };
// conversion Path // conversion Path
// 转化路径 // 转化路径
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment