Commit ed0b743c authored by jim's avatar jim

fix megre v2 bug

parent c9ff3d38
...@@ -23,11 +23,8 @@ class HeaderView extends PureComponent { ...@@ -23,11 +23,8 @@ class HeaderView extends PureComponent {
.removeEventListener('scroll', this.handScroll); .removeEventListener('scroll', this.handScroll);
} }
getHeadWidth = () => { getHeadWidth = () => {
if ( const { fixedHeader, layout, fixSiderbar } = this.props.setting;
!this.props.fixedHeader || if (!fixedHeader || layout === 'topmenu' || fixSiderbar) {
this.props.layout === 'topmenu' ||
this.props.fixSiderbar
) {
return '100%'; return '100%';
} }
if (!this.props.collapsed) { if (!this.props.collapsed) {
...@@ -93,14 +90,8 @@ class HeaderView extends PureComponent { ...@@ -93,14 +90,8 @@ class HeaderView extends PureComponent {
} }
}; };
render() { render() {
const { const { isMobile, handleMenuCollapse } = this.props;
logo, const { silderTheme, layout, fixedHeader } = this.props.setting;
isMobile,
handleMenuCollapse,
silderTheme,
layout,
fixedHeader,
} = this.props;
const isTop = layout === 'topmenu'; const isTop = layout === 'topmenu';
const HeaderDom = this.state.visible ? ( const HeaderDom = this.state.visible ? (
<Header <Header
...@@ -109,22 +100,19 @@ class HeaderView extends PureComponent { ...@@ -109,22 +100,19 @@ class HeaderView extends PureComponent {
> >
{isTop && !isMobile ? ( {isTop && !isMobile ? (
<TopNavHeader <TopNavHeader
logo={logo}
theme={silderTheme} theme={silderTheme}
mode="horizontal" mode="horizontal"
Authorized={Authorized} Authorized={Authorized}
isMobile={isMobile}
onNoticeClear={this.handleNoticeClear}
onCollapse={handleMenuCollapse} onCollapse={handleMenuCollapse}
onNoticeClear={this.handleNoticeClear}
onMenuClick={this.handleMenuClick} onMenuClick={this.handleMenuClick}
onNoticeVisibleChange={this.handleNoticeVisibleChange} onNoticeVisibleChange={this.handleNoticeVisibleChange}
{...this.props} {...this.props}
/> />
) : ( ) : (
<GlobalHeader <GlobalHeader
logo={logo}
onNoticeClear={this.handleNoticeClear}
onCollapse={handleMenuCollapse} onCollapse={handleMenuCollapse}
onNoticeClear={this.handleNoticeClear}
onMenuClick={this.handleMenuClick} onMenuClick={this.handleMenuClick}
onNoticeVisibleChange={this.handleNoticeVisibleChange} onNoticeVisibleChange={this.handleNoticeVisibleChange}
{...this.props} {...this.props}
...@@ -145,9 +133,5 @@ export default connect(({ user, global, setting, loading }) => ({ ...@@ -145,9 +133,5 @@ export default connect(({ user, global, setting, loading }) => ({
collapsed: global.collapsed, collapsed: global.collapsed,
fetchingNotices: loading.effects['global/fetchNotices'], fetchingNotices: loading.effects['global/fetchNotices'],
notices: global.notices, notices: global.notices,
layout: setting.layout, setting,
silderTheme: setting.silderTheme,
fixedHeader: setting.fixedHeader,
fixSiderbar: setting.fixSiderbar,
autoHideHeader: setting.autoHideHeader,
}))(HeaderView); }))(HeaderView);
...@@ -73,7 +73,12 @@ export default class Info extends Component { ...@@ -73,7 +73,12 @@ export default class Info extends Component {
} }
return ( return (
<GridContent> <GridContent>
<div className={styles.main}> <div
className={styles.main}
ref={(ref) => {
this.main = ref;
}}
>
<div className={styles.leftmenu}> <div className={styles.leftmenu}>
<Menu <Menu
mode={this.state.mode} mode={this.state.mode}
......
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