Commit b0567ad9 authored by ι™ˆεΈ…'s avatar ι™ˆεΈ…

Fix the problem that the icon becomes a block element

parent 6180e59c
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { Icon, Divider } from 'antd'; import { Icon } from 'antd';
import Link from 'umi/link'; import Link from 'umi/link';
import Debounce from 'lodash-decorators/debounce'; import Debounce from 'lodash-decorators/debounce';
import styles from './index.less'; import styles from './index.less';
...@@ -26,12 +26,11 @@ export default class GlobalHeader extends PureComponent { ...@@ -26,12 +26,11 @@ export default class GlobalHeader extends PureComponent {
const { collapsed, isMobile, logo } = this.props; const { collapsed, isMobile, logo } = this.props;
return ( return (
<div className={styles.header}> <div className={styles.header}>
{isMobile && [ {isMobile && (
<Link to="/" className={styles.logo} key="logo"> <Link to="/" className={styles.logo} key="logo">
<img src={logo} alt="logo" width="32" /> <img src={logo} alt="logo" width="32" />
</Link>, </Link>
<Divider type="vertical" key="line" />, )}
]}
<Icon <Icon
className={styles.trigger} className={styles.trigger}
type={collapsed ? 'menu-unfold' : 'menu-fold'} type={collapsed ? 'menu-unfold' : 'menu-fold'}
......
...@@ -36,7 +36,7 @@ i.trigger { ...@@ -36,7 +36,7 @@ i.trigger {
line-height: 64px; line-height: 64px;
cursor: pointer; cursor: pointer;
transition: all 0.3s, padding 0s; transition: all 0.3s, padding 0s;
padding: 0 24px; padding: 24px;
&:hover { &:hover {
background: @primary-1; background: @primary-1;
} }
...@@ -45,7 +45,6 @@ i.trigger { ...@@ -45,7 +45,6 @@ i.trigger {
.right { .right {
float: right; float: right;
height: 100%; height: 100%;
width: 324px;
.action { .action {
cursor: pointer; cursor: pointer;
padding: 0 12px; padding: 0 12px;
...@@ -106,7 +105,7 @@ i.trigger { ...@@ -106,7 +105,7 @@ i.trigger {
display: none; display: none;
} }
i.trigger { i.trigger {
padding: 0 12px; padding: 24px 12px;
} }
.logo { .logo {
padding-right: 12px; padding-right: 12px;
......
...@@ -39,7 +39,6 @@ export default class TopNavHeader extends PureComponent { ...@@ -39,7 +39,6 @@ export default class TopNavHeader extends PureComponent {
</div> </div>
<div <div
style={{ style={{
flex: 1,
maxWidth, maxWidth,
}} }}
> >
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment