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

fix: fixed header width (#1614)

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