Procházet zdrojové kódy

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

杨加莹 před 7 roky
rodič
revize
62ab8b47c6
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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',
       };