diff --git a/src/components/SiderMenu/SiderMenu.js b/src/components/SiderMenu/SiderMenu.js index c16a3ed95b8a0170cc3e2292dca261d8634569a0..8d2108b23151f1cd44be16521935fefd408780a1 100644 --- a/src/components/SiderMenu/SiderMenu.js +++ b/src/components/SiderMenu/SiderMenu.js @@ -1,9 +1,7 @@ import React, { PureComponent } from 'react'; import { Layout, Menu, Icon } from 'antd'; import { Link } from 'dva/router'; -import logo from '../../assets/logo.svg'; import styles from './index.less'; -import { getMenuData } from '../../common/menu'; const { Sider } = Layout; const { SubMenu } = Menu; @@ -11,7 +9,7 @@ const { SubMenu } = Menu; export default class SiderMenu extends PureComponent { constructor(props) { super(props); - this.menus = getMenuData(); + this.menus = props.menuData; this.state = { openKeys: this.getDefaultCollapsedSubMenus(props), }; @@ -131,7 +129,7 @@ export default class SiderMenu extends PureComponent { }); } render() { - const { collapsed, location: { pathname }, onCollapse } = this.props; + const { logo, collapsed, location: { pathname }, onCollapse } = this.props; const { openKeys } = this.state; // Don't show popup menu when it is been collapsed const menuProps = collapsed ? {} : { diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index 429431d40047751ab153d95cb71bbf8cc9b03fd1..5eda00f329ffb4c50e856efbc79a20e572b6cecc 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -129,6 +129,8 @@ class BasicLayout extends React.PureComponent { const layout = (