From eca38b9c2905f7206f02589a49333fdb0f1b30d2 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 6 Sep 2017 13:42:46 +0800 Subject: [PATCH] Fix menu --- .roadhogrc | 8 ++++---- src/layouts/BasicLayout.js | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.roadhogrc b/.roadhogrc index c039a47c..f4e2e958 100755 --- a/.roadhogrc +++ b/.roadhogrc @@ -21,9 +21,9 @@ "font-size-base": "14px", "badge-font-size": "12px", "btn-font-size-lg": "@font-size-base", - "@menu-dark-bg": "#000B14", - "@menu-dark-submenu-bg": "#00182E", - "@layout-sider-background": "#000B14", - "layout-body-background": "#f5f5f5" + "@menu-dark-bg": "#00182E", + "@menu-dark-submenu-bg": "#000B14", + "@layout-sider-background": "#00182E", + "layout-body-background": "#f0f2f5" } } diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index 0a0a2852..3e1e78bb 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -136,7 +136,7 @@ class BasicLayout extends React.PureComponent { return groupBy(newNotices, 'type'); } handleOpenChange = (openKeys) => { - const latestOpenKey = openKeys.find(key => this.state.openKeys.find(key)); + const latestOpenKey = openKeys.find(key => this.state.openKeys.indexOf(key) === -1); this.setState({ openKeys: latestOpenKey ? [latestOpenKey] : [], }); @@ -198,7 +198,6 @@ class BasicLayout extends React.PureComponent {