diff --git a/src/components/GlobalHeader/index.js b/src/components/GlobalHeader/index.js
index 156f1b7d..fe96cdea 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 10758fe9..db11b783 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 ee91cd64..ab006bf9 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 819c0f8c..e7f12ab3 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 e819cda3..83e8837e 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 (