From 62ab8b47c6b7914bbc2e9f2b88b15164a09eeeb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=8A=A0=E8=8E=B9?= <1570263943@qq.com> Date: Fri, 7 Sep 2018 00:53:35 +0800 Subject: [PATCH] fix #2175 the Siderbar padding error on the mobile with fixSiderbar=true --- src/layouts/BasicLayout.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index 4b2c1d45..e08785f2 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -175,8 +175,9 @@ class BasicLayout extends React.PureComponent { }; getLayoutStyle = () => { + const { isMobile } = this.state; const { fixSiderbar, collapsed, layout } = this.props; - if (fixSiderbar && layout !== 'topmenu') { + if (fixSiderbar && layout !== 'topmenu' && !isMobile) { return { paddingLeft: collapsed ? '80px' : '256px', }; -- GitLab