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