From ed0b743c55fd6b3e681cb0947206f55207e8f08d Mon Sep 17 00:00:00 2001 From: jim Date: Fri, 9 Mar 2018 22:06:37 +0800 Subject: [PATCH] fix megre v2 bug --- src/layouts/Header.js | 30 ++++++------------------- src/routes/UserProfile/Userinfo/Info.js | 7 +++++- 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/src/layouts/Header.js b/src/layouts/Header.js index 52def2d5..dca7084a 100644 --- a/src/layouts/Header.js +++ b/src/layouts/Header.js @@ -23,11 +23,8 @@ class HeaderView extends PureComponent { .removeEventListener('scroll', this.handScroll); } getHeadWidth = () => { - if ( - !this.props.fixedHeader || - this.props.layout === 'topmenu' || - this.props.fixSiderbar - ) { + const { fixedHeader, layout, fixSiderbar } = this.props.setting; + if (!fixedHeader || layout === 'topmenu' || fixSiderbar) { return '100%'; } if (!this.props.collapsed) { @@ -93,14 +90,8 @@ class HeaderView extends PureComponent { } }; render() { - const { - logo, - isMobile, - handleMenuCollapse, - silderTheme, - layout, - fixedHeader, - } = this.props; + const { isMobile, handleMenuCollapse } = this.props; + const { silderTheme, layout, fixedHeader } = this.props.setting; const isTop = layout === 'topmenu'; const HeaderDom = this.state.visible ? (
{isTop && !isMobile ? ( ) : ( ({ collapsed: global.collapsed, fetchingNotices: loading.effects['global/fetchNotices'], notices: global.notices, - layout: setting.layout, - silderTheme: setting.silderTheme, - fixedHeader: setting.fixedHeader, - fixSiderbar: setting.fixSiderbar, - autoHideHeader: setting.autoHideHeader, + setting, }))(HeaderView); diff --git a/src/routes/UserProfile/Userinfo/Info.js b/src/routes/UserProfile/Userinfo/Info.js index 57b07d8c..529b1047 100644 --- a/src/routes/UserProfile/Userinfo/Info.js +++ b/src/routes/UserProfile/Userinfo/Info.js @@ -73,7 +73,12 @@ export default class Info extends Component { } return ( -
+
{ + this.main = ref; + }} + >