From 4bec5248b930c16abfc5afb17f85535a44046158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A4=E5=8E=BB?= Date: Thu, 17 May 2018 00:01:22 +0800 Subject: [PATCH] fix typo `getMeunMatchKeys` => `getMenuMatchKeys` --- src/components/SiderMenu/SiderMenu.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/SiderMenu/SiderMenu.js b/src/components/SiderMenu/SiderMenu.js index f1b44f55..2068b7b8 100644 --- a/src/components/SiderMenu/SiderMenu.js +++ b/src/components/SiderMenu/SiderMenu.js @@ -42,7 +42,7 @@ export const getFlatMenuKeys = menu => * @param flatMenuKeys: [/abc, /abc/:id, /abc/:id/info] * @param paths: [/abc, /abc/11, /abc/11/info] */ -export const getMeunMatchKeys = (flatMenuKeys, paths) => +export const getMenuMatchKeys = (flatMenuKeys, paths) => paths .reduce((matchKeys, path) => ( matchKeys.concat( @@ -72,7 +72,7 @@ export default class SiderMenu extends PureComponent { */ getDefaultCollapsedSubMenus(props) { const { location: { pathname } } = props || this.props; - return getMeunMatchKeys(this.flatMenuKeys, urlToList(pathname)); + return getMenuMatchKeys(this.flatMenuKeys, urlToList(pathname)); } /** * 判断是否是http链接.返回 Link 或 a @@ -161,7 +161,7 @@ export default class SiderMenu extends PureComponent { // Get the currently selected menu getSelectedMenuKeys = () => { const { location: { pathname } } = this.props; - return getMeunMatchKeys(this.flatMenuKeys, urlToList(pathname)); + return getMenuMatchKeys(this.flatMenuKeys, urlToList(pathname)); }; // conversion Path // 转化路径 -- GitLab