diff --git a/src/components/SiderMenu/SiderMenu.js b/src/components/SiderMenu/SiderMenu.js index e1b49d0037e20972f044e2691e00869fd01a0ed1..2522b4f0a1772dcdca7f68ee9bdeff12d39e7c8c 100644 --- a/src/components/SiderMenu/SiderMenu.js +++ b/src/components/SiderMenu/SiderMenu.js @@ -51,7 +51,7 @@ export default class SiderMenu extends PureComponent { const defaultProps = collapsed ? {} : { openKeys }; const siderClassName = classNames(styles.sider, { - [styles.fixSiderbar]: fixSiderbar, + [styles.fixSiderBar]: fixSiderbar, [styles.light]: theme === 'light', }); return ( diff --git a/src/components/SiderMenu/index.less b/src/components/SiderMenu/index.less index 9ae37db198bbb263e206bddbaf5f9e189b07fd9f..d801b4bd36dc88f9d8478bf76c01e47397dec8b8 100644 --- a/src/components/SiderMenu/index.less +++ b/src/components/SiderMenu/index.less @@ -25,13 +25,13 @@ font-weight: 600; } } - .sider { min-height: 100vh; box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35); position: relative; z-index: 10; - &.fixSiderbar { + &.fixSiderBar { + box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05); position: fixed; top: 0; left: 0; diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index bd7e6eb9d447f05b14a6438ebec43f6bbea670ac..4e9c2e5294e288343bfd7d0dd295c186d9d2ceba 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -51,7 +51,7 @@ const query = { }, }; -class BasicLayout extends React.PureComponent { +class BasicLayout extends React.Component { constructor(props) { super(props); this.getPageTitle = memoizeOne(this.getPageTitle); diff --git a/src/layouts/Header.js b/src/layouts/Header.js index 3c22510da00ee2317e3140d18474bbcfa20b0fc6..0059ee7ea951319140e6589da1134e5fbe3b12c2 100644 --- a/src/layouts/Header.js +++ b/src/layouts/Header.js @@ -1,4 +1,4 @@ -import React, { PureComponent } from 'react'; +import React, { Component } from 'react'; import { formatMessage } from 'umi/locale'; import { Layout, message } from 'antd'; import Animate from 'rc-animate'; @@ -10,7 +10,7 @@ import styles from './Header.less'; const { Header } = Layout; -class HeaderView extends PureComponent { +class HeaderView extends Component { state = { visible: true, }; diff --git a/src/layouts/UserLayout.js b/src/layouts/UserLayout.js index 16b70ac77f40e57fc10411f1ff95efc9c8c49205..112c61c0060372f76648ba0f1bbdc2945801a4ce 100644 --- a/src/layouts/UserLayout.js +++ b/src/layouts/UserLayout.js @@ -31,42 +31,26 @@ const copyright = ( ); -class UserLayout extends React.PureComponent { - // @TODO title - // getPageTitle() { - // const { routerData, location } = this.props; - // const { pathname } = location; - // let title = 'Ant Design Pro'; - // if (routerData[pathname] && routerData[pathname].name) { - // title = `${routerData[pathname].name} - Ant Design Pro`; - // } - // return title; - // } - - render() { - const { children } = this.props; - return ( - // @TODO -
-
- -
-
-
-
- - logo - Ant Design - -
-
Ant Design 是西湖区最具影响力的 Web 设计规范
-
- {children} +const UserLayout = ({ children }) => ( + // @TODO +
+
+ +
+
+
+
+ + logo + Ant Design +
- +
Ant Design 是西湖区最具影响力的 Web 设计规范
- ); - } -} + {children} +
+ +
+); export default UserLayout;