فهرست منبع

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