From 904ca0aeffa8f8eb643449e8c336e57fcf9e88db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Sat, 9 Jun 2018 22:57:17 +0800 Subject: [PATCH] Fix#1640 Floating Component Style Issues --- src/components/GlobalHeader/index.less | 7 ------- src/components/SiderMenu/SliderMenu.js | 6 ++++-- src/components/SiderMenu/index.less | 5 +++++ src/layouts/BasicLayout.js | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/GlobalHeader/index.less b/src/components/GlobalHeader/index.less index a9b11458..f1928d4c 100644 --- a/src/components/GlobalHeader/index.less +++ b/src/components/GlobalHeader/index.less @@ -8,13 +8,6 @@ position: relative; } -:global { - .ant-layout { - min-height: 100vh; - overflow-x: hidden; - } -} - .logo { height: 64px; line-height: 58px; diff --git a/src/components/SiderMenu/SliderMenu.js b/src/components/SiderMenu/SliderMenu.js index 1f4c0339..5bd10b16 100644 --- a/src/components/SiderMenu/SliderMenu.js +++ b/src/components/SiderMenu/SliderMenu.js @@ -220,7 +220,7 @@ export default class SiderMenu extends PureComponent { }); }; render() { - const { logo, collapsed, onCollapse, theme } = this.props; + const { logo, collapsed, onCollapse, fixSiderbar, theme } = this.props; const { openKeys } = this.state; const defaultProps = collapsed ? {} : { openKeys }; return ( @@ -231,7 +231,9 @@ export default class SiderMenu extends PureComponent { breakpoint="lg" onCollapse={onCollapse} width={256} - className={`${styles.sider} ${theme === 'light' ? styles.light : ''}`} + className={`${styles.sider} ${fixSiderbar ? styles.fixSiderbar : ''} ${ + theme === 'light' ? styles.light : '' + }`} >