Commit 189c5882 authored by 陈帅's avatar 陈帅 Committed by 陈小聪

remove PureComponent (#3470)

* remove PureComponent

* fix typo
parent b095b0bc
......@@ -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 (
......
......@@ -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;
......
......@@ -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);
......
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,
};
......
......@@ -31,21 +31,7 @@ const copyright = (
</Fragment>
);
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 (
const UserLayout = ({ children }) => (
// @TODO <DocumentTitle title={this.getPageTitle()}>
<div className={styles.container}>
<div className={styles.lang}>
......@@ -65,8 +51,6 @@ class UserLayout extends React.PureComponent {
</div>
<GlobalFooter links={links} copyright={copyright} />
</div>
);
}
}
);
export default UserLayout;
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