Commit eca38b9c authored by afc163's avatar afc163

Fix menu

parent f7fa3988
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
"font-size-base": "14px", "font-size-base": "14px",
"badge-font-size": "12px", "badge-font-size": "12px",
"btn-font-size-lg": "@font-size-base", "btn-font-size-lg": "@font-size-base",
"@menu-dark-bg": "#000B14", "@menu-dark-bg": "#00182E",
"@menu-dark-submenu-bg": "#00182E", "@menu-dark-submenu-bg": "#000B14",
"@layout-sider-background": "#000B14", "@layout-sider-background": "#00182E",
"layout-body-background": "#f5f5f5" "layout-body-background": "#f0f2f5"
} }
} }
...@@ -136,7 +136,7 @@ class BasicLayout extends React.PureComponent { ...@@ -136,7 +136,7 @@ class BasicLayout extends React.PureComponent {
return groupBy(newNotices, 'type'); return groupBy(newNotices, 'type');
} }
handleOpenChange = (openKeys) => { 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({ this.setState({
openKeys: latestOpenKey ? [latestOpenKey] : [], openKeys: latestOpenKey ? [latestOpenKey] : [],
}); });
...@@ -198,7 +198,6 @@ class BasicLayout extends React.PureComponent { ...@@ -198,7 +198,6 @@ class BasicLayout extends React.PureComponent {
<Menu <Menu
theme="dark" theme="dark"
mode="inline" mode="inline"
openKeys={this.state.openKeys}
onOpenChange={this.handleOpenChange} onOpenChange={this.handleOpenChange}
selectedKeys={this.getCurrentMenuSelectedKeys()} selectedKeys={this.getCurrentMenuSelectedKeys()}
style={{ margin: '24px 0', width: '100%' }} 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