소스 검색

fix #2175 the Siderbar padding error on the mobile with fixSiderbar=true

杨加莹 7 년 전
부모
커밋
62ab8b47c6
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/layouts/BasicLayout.js

+ 2 - 1
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',
       };