From 63bcfdbbd858a1f69f20606f033010a6dbd592b3 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 28 Aug 2017 18:04:38 +0800 Subject: [PATCH] Fix menu and logo style --- src/layouts/BasicLayout.js | 3 ++- src/layouts/BasicLayout.less | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index bd3ffa8a..d9221577 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -168,7 +168,7 @@ class BasicLayout extends React.PureComponent { breakpoint="md" onCollapse={this.onCollapse} style={{ minHeight: '100vh' }} - width={272} + width={256} >
@@ -182,6 +182,7 @@ class BasicLayout extends React.PureComponent { defaultOpenKeys={this.getDefaultCollapsedSubMenus()} selectedKeys={this.getCurrentMenuSelectedKeys()} style={{ margin: '24px 0', width: '100%' }} + inlineIndent={32} > {this.getNavMenuItems(menus)} diff --git a/src/layouts/BasicLayout.less b/src/layouts/BasicLayout.less index eccda762..7cc6fb07 100644 --- a/src/layouts/BasicLayout.less +++ b/src/layouts/BasicLayout.less @@ -10,7 +10,8 @@ height: 64px; position: relative; line-height: 64px; - padding: 0 24px; + padding-left: 32px; + transition: all .3s; background: @primary-color; overflow: hidden; img { @@ -29,8 +30,11 @@ } } -:global(.ant-layout-sider-collapsed) .logo > a { - width: 32px; +:global(.ant-layout-sider-collapsed) .logo { + padding-left: 24px; + > a { + width: 32px; + } } .trigger { @@ -40,7 +44,6 @@ transition: all .3s; color: #fff; padding: 0 28px; - vertical-align: middle; &:hover { background: @primary-7; } -- GitLab