Commit 268a4ef3 authored by afc163's avatar afc163

update head profile style

parent 9fc2c15a
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { Layout, Menu, Icon, Avatar, Dropdown, Tag, message } from 'antd'; import { Layout, Menu, Icon, Avatar, Dropdown, Tag, message, Spin } from 'antd';
import DocumentTitle from 'react-document-title'; import DocumentTitle from 'react-document-title';
import { connect } from 'dva'; import { connect } from 'dva';
import { Link, routerRedux } from 'dva/router'; import { Link, routerRedux } from 'dva/router';
...@@ -164,8 +164,8 @@ class BasicLayout extends React.PureComponent { ...@@ -164,8 +164,8 @@ class BasicLayout extends React.PureComponent {
const menu = ( const menu = (
<Menu className={styles.menu} selectedKeys={[]} onClick={this.onMenuClick}> <Menu className={styles.menu} selectedKeys={[]} onClick={this.onMenuClick}>
<Menu.Item><Icon type="user" />个人中心</Menu.Item> <Menu.Item disabled><Icon type="user" />个人中心</Menu.Item>
<Menu.Item><Icon type="setting" />设置</Menu.Item> <Menu.Item disabled><Icon type="setting" />设置</Menu.Item>
<Menu.Divider /> <Menu.Divider />
<Menu.Item key="logout"><Icon type="logout" />退出登录</Menu.Item> <Menu.Item key="logout"><Icon type="logout" />退出登录</Menu.Item>
</Menu> </Menu>
...@@ -243,12 +243,14 @@ class BasicLayout extends React.PureComponent { ...@@ -243,12 +243,14 @@ class BasicLayout extends React.PureComponent {
<NoticeIcon.Tab list={noticeData['消息']} title="消息" /> <NoticeIcon.Tab list={noticeData['消息']} title="消息" />
<NoticeIcon.Tab list={noticeData['待办']} title="待办" /> <NoticeIcon.Tab list={noticeData['待办']} title="待办" />
</NoticeIcon> </NoticeIcon>
<Dropdown overlay={menu}> {currentUser.name ? (
<span className={`${styles.action} ${styles.account}`}> <Dropdown overlay={menu}>
<Avatar size="small" className={styles.avatar} src={currentUser.avatar} /> <span className={`${styles.action} ${styles.account}`}>
{currentUser.name} <Avatar size="small" className={styles.avatar} src={currentUser.avatar} />
</span> {currentUser.name}
</Dropdown> </span>
</Dropdown>
) : <Spin size="small" style={{ marginLeft: 8 }} />}
</div> </div>
</Header> </Header>
<Content style={{ margin: '24px 24px 0', height: '100%' }}> <Content style={{ margin: '24px 24px 0', height: '100%' }}>
......
...@@ -89,9 +89,7 @@ ...@@ -89,9 +89,7 @@
margin-right: 8px; margin-right: 8px;
} }
:global(.ant-dropdown-menu-item) { :global(.ant-dropdown-menu-item) {
padding-left: 16px; width: 160px;
padding-right: 16px;
width: 190px;
} }
} }
......
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