diff --git a/src/components/GlobalHeader/index.js b/src/components/GlobalHeader/index.js
index 156f1b7d07dc41a094c24220d0d067c0e05c52da..fe96cdea6d003485c78bd404cee957f7d0a345b1 100644
--- a/src/components/GlobalHeader/index.js
+++ b/src/components/GlobalHeader/index.js
@@ -31,11 +31,9 @@ export default class GlobalHeader extends PureComponent {
)}
-
+
+
+
);
diff --git a/src/components/GlobalHeader/index.less b/src/components/GlobalHeader/index.less
index 10758fe9cd156b14b14f78d6ed2d9bac5937fcc3..db11b7830e7ee98a4ce333f76739b51592ff464a 100644
--- a/src/components/GlobalHeader/index.less
+++ b/src/components/GlobalHeader/index.less
@@ -3,7 +3,7 @@
@pro-header-hover-bg: rgba(0, 0, 0, 0.025);
.header {
- height: 64px;
+ height: @layout-header-height;
padding: 0;
background: #fff;
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
@@ -11,8 +11,8 @@
}
.logo {
- height: 64px;
- line-height: 58px;
+ height: @layout-header-height;
+ line-height: @layout-header-height;
vertical-align: top;
display: inline-block;
padding: 0 0 0 24px;
@@ -33,12 +33,12 @@
}
}
-i.trigger {
+.trigger {
font-size: 20px;
- height: 64px;
+ height: @layout-header-height;
cursor: pointer;
transition: all 0.3s, padding 0s;
- padding: 22px 24px;
+ padding: ~'calc((@{layout-header-height} - 20px) / 2)' 24px;
&:hover {
background: @pro-header-hover-bg;
}
@@ -73,7 +73,8 @@ i.trigger {
}
.account {
.avatar {
- margin: 20px 8px 20px 0;
+ margin: ~'calc((@{layout-header-height} - 24px) / 2)' 0;
+ margin-right: 8px;
color: @primary-color;
background: rgba(255, 255, 255, 0.85);
vertical-align: top;
@@ -82,7 +83,7 @@ i.trigger {
}
.dark {
- height: 64px;
+ height: @layout-header-height;
.action {
color: rgba(255, 255, 255, 0.85);
> i {
diff --git a/src/components/SelectLang/index.js b/src/components/SelectLang/index.js
index ee91cd64d09e613af36e955aa45a88820324b52e..ab006bf9a498b2d7c0ea8b0b458e57fb1b99014f 100644
--- a/src/components/SelectLang/index.js
+++ b/src/components/SelectLang/index.js
@@ -42,11 +42,9 @@ export default class SelectLang extends PureComponent {
);
return (
-
+
+
+
);
}
diff --git a/src/components/SelectLang/index.less b/src/components/SelectLang/index.less
index 819c0f8c282d87302c09b02bcfa5c4e9c3e95c52..e7f12ab3c72aea38ef2c27cf486a1045ff110770 100644
--- a/src/components/SelectLang/index.less
+++ b/src/components/SelectLang/index.less
@@ -11,11 +11,14 @@
.dropDown {
cursor: pointer;
- font-size: 14px;
vertical-align: top;
- line-height: 64px;
- > svg {
- position: relative;
- top: 2px;
+ line-height: @layout-header-height;
+ > i {
+ font-size: 14px !important;
+ transform: none !important;
+ svg {
+ position: relative;
+ top: -1px;
+ }
}
}
diff --git a/src/components/SiderMenu/BaseMenu.js b/src/components/SiderMenu/BaseMenu.js
index e819cda3f043184ab3b220e2b04758d16700dec8..83e8837e1ddf04165cd75ae9125104620a869dad 100644
--- a/src/components/SiderMenu/BaseMenu.js
+++ b/src/components/SiderMenu/BaseMenu.js
@@ -1,4 +1,5 @@
import React, { PureComponent } from 'react';
+import classNames from 'classnames';
import { Menu, Icon } from 'antd';
import Link from 'umi/link';
import isEqual from 'lodash/isEqual';
@@ -130,6 +131,7 @@ export default class BaseMenu extends PureComponent {
theme,
mode,
location: { pathname },
+ className,
} = this.props;
// if pathname can't match, use the nearest parent's key
let selectedKeys = this.getSelectedMenuKeys(pathname);
@@ -143,6 +145,10 @@ export default class BaseMenu extends PureComponent {
};
}
const { handleOpenChange, style, menuData } = this.props;
+ const cls = classNames(className, {
+ 'top-nav-menu': mode === 'horizontal',
+ });
+
return (