/* eslint-disable */
|
/**柯礼钦
|
* 4/2/2020, 11:22:51 AM
|
* doc comment for the file goes here
|
*/
|
|
/** 头部组件 */
|
|
import React from 'react';
|
import { Layout, Menu, Dropdown, Icon, Row, Col, message } from 'antd';
|
const { Header } = Layout;
|
import './index.scss';
|
|
const menu = (
|
<Menu>
|
<Menu.Item>
|
<a onClick={() => {
|
// 清空用户相关信息
|
window.localStorage.setItem('menu', '');
|
window.localStorage.setItem('token', '');
|
message.success('退出成功!');
|
window.location.href = window.location.origin + '/#/login';
|
}}>
|
退出
|
</a>
|
</Menu.Item>
|
|
</Menu>
|
);
|
|
export default function MenuView({ }) {
|
|
return (
|
<Header style={{ background: '#fff', padding: 0, boxShadow: 'inset 0 -1px 0 0 #E5E5E5' }}>
|
<Row type="flex" align="middle" justify="end" >
|
<Col style={{ marginRight: 40 }}>
|
<Dropdown overlay={menu}>
|
<a className="ant-dropdown-link" onClick={e => e.preventDefault()}>
|
登陆人<Icon type="down" />
|
</a>
|
</Dropdown>
|
</Col>
|
</Row>
|
</Header>
|
);
|
}
|