KaysonCui 5 years ago
parent
commit
151498f248
2 changed files with 17 additions and 14 deletions
  1. 7 5
      front/src/containers/AdminLeft.js
  2. 10 9
      front/src/style/adminLeft.less

+ 7 - 5
front/src/containers/AdminLeft.js

@@ -43,7 +43,7 @@ export default class extends Component {
   render() {
     const { config } = this.props;
     return (
-      <div className="admin" style={{ height: window.document.documentElement.clientHeight }}>
+      <div className="admin-left" style={{ height: window.document.documentElement.clientHeight }}>
         {config.module ? this.renderLayoutView() : this.renderContentView(true)}
       </div>
     );
@@ -154,10 +154,12 @@ export default class extends Component {
                         );
                       })}
                     </SubMenu>
-                  ) : (<Menu.Item key={group.key} path={group.path}>
-                    <Icon type={group.icon} />
-                    <span>{group.name}</span>
-                  </Menu.Item>);
+                  ) : (
+                    <Menu.Item key={group.key} path={group.path}>
+                      <Icon type={group.icon} />
+                      <span>{group.name}</span>
+                    </Menu.Item>
+                  );
                   return view;
                 })}
               </Menu>

+ 10 - 9
front/src/style/adminLeft.less

@@ -22,19 +22,20 @@ body,
 }
 
 #root {
-  background: @admin_bg_color;
 
-  .block {
-    margin-bottom: 20px;
-  }
+  .admin-left {
+    background: @admin_bg_color;
 
-  .table-button {
-    a {
-      margin: 0 2px;
+    .block {
+      margin-bottom: 20px;
+    }
+
+    .table-button {
+      a {
+        margin: 0 2px;
+      }
     }
-  }
 
-  .admin {
     .ant-layout-sider-collapsed {
       #logo {
         h1 {