Commit eca38b9c authored by afc163's avatar afc163

Fix menu

parent f7fa3988
......@@ -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"
}
}
......@@ -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 {
<Menu
theme="dark"
mode="inline"
openKeys={this.state.openKeys}
onOpenChange={this.handleOpenChange}
selectedKeys={this.getCurrentMenuSelectedKeys()}
style={{ margin: '24px 0', width: '100%' }}
......
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