Commit 344c9f74 authored by 柴茂源's avatar 柴茂源 Committed by 陈帅

fix: fixed header width (#1614)

parent e0cf86a3
...@@ -21,16 +21,12 @@ class HeaderView extends PureComponent { ...@@ -21,16 +21,12 @@ class HeaderView extends PureComponent {
document.getElementById('root').removeEventListener('scroll', this.handScroll); document.getElementById('root').removeEventListener('scroll', this.handScroll);
} }
getHeadWidth = () => { getHeadWidth = () => {
const { fixedHeader, layout, fixSiderbar } = this.props.setting; const { isMobile, collapsed, setting } = this.props;
if (!fixedHeader || layout === 'topmenu' || fixSiderbar) { const { fixedHeader, layout } = setting;
if (isMobile || !fixedHeader || layout === 'topmenu') {
return '100%'; return '100%';
} }
if (!this.props.collapsed) { return collapsed ? 'calc(100% - 80px)' : 'calc(100% - 256px)';
return 'calc(100% - 256px)';
}
if (this.props.collapsed) {
return 'calc(100% - 80px)';
}
}; };
handleNoticeClear = type => { handleNoticeClear = type => {
message.success(`清空了${type}`); message.success(`清空了${type}`);
......
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