From eda9f31ddf9724ecc6e039510a222fda2ec2ba3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Mon, 11 Jun 2018 19:51:54 +0800 Subject: [PATCH] remove this.menus --- src/components/SiderMenu/BaseMenu.js | 3 +-- src/components/SiderMenu/SliderMenu.js | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/SiderMenu/BaseMenu.js b/src/components/SiderMenu/BaseMenu.js index cbbdd386..21e02dc6 100644 --- a/src/components/SiderMenu/BaseMenu.js +++ b/src/components/SiderMenu/BaseMenu.js @@ -30,7 +30,6 @@ export const getMenuMatches = (flatMenuKeys, path) => { export default class BaseMenu extends PureComponent { constructor(props) { super(props); - this.menus = props.menuData; this.flatMenuKeys = this.getFlatMenuKeys(props.menuData); } /** @@ -172,7 +171,7 @@ export default class BaseMenu extends PureComponent { style={this.props.style} {...props} > - {this.getNavMenuItems(this.menus)} + {this.getNavMenuItems(this.props.menuData)} ); } diff --git a/src/components/SiderMenu/SliderMenu.js b/src/components/SiderMenu/SliderMenu.js index 5bd10b16..ed36a394 100644 --- a/src/components/SiderMenu/SliderMenu.js +++ b/src/components/SiderMenu/SliderMenu.js @@ -67,7 +67,6 @@ export const getMenuMatchKeys = (flatMenuKeys, paths) => export default class SiderMenu extends PureComponent { constructor(props) { super(props); - this.menus = props.menuData; this.flatMenuKeys = getFlatMenuKeys(props.menuData); this.state = { pathname: props.location.pathname, -- GitLab