diff --git a/src/layouts/Header.js b/src/layouts/Header.js index 52def2d573db311695fe53d640d287951907a707..dca7084a0323e6f415b2b2ce16a0823aa8723980 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 57b07d8c5d487c4bfae80197d0d0fb2439090a40..529b1047b56108a0d9b97711bfc79eb786113ac1 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; + }} + >