From 000ff61dd8a88eb875048e6a3deca8679d75df18 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 29 八月 2020 11:29:33 +0800 Subject: [PATCH] 2020-08-29 --- src/menu/header/index.jsx | 46 +++++++++++++++++++++++----------------------- 1 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/menu/header/index.jsx b/src/menu/header/index.jsx index 1e9ae6d..e8ab7dc 100644 --- a/src/menu/header/index.jsx +++ b/src/menu/header/index.jsx @@ -3,7 +3,7 @@ import { is, fromJS } from 'immutable' import { connect } from 'react-redux' import { withRouter } from 'react-router-dom' -import {Dropdown, Menu, Icon, Modal } from 'antd' +// import { Icon, Modal } from 'antd' import { logout } from '@/store/action' import zhCN from '@/locales/zh-CN/mob.js' @@ -11,7 +11,7 @@ import avatar from '@/assets/img/avatar.jpg' import './index.scss' -const { confirm } = Modal +// const { confirm } = Modal class MobHeader extends Component { static propTpyes = { @@ -27,22 +27,22 @@ userName: sessionStorage.getItem('CloudUserName') } - logout = () => { - // 閫�鍑虹櫥褰� - let _this = this - confirm({ - title: this.state.dict['mob.logout.hint'], - content: '', - okText: this.state.dict['mob.confirm'], - cancelText: this.state.dict['mob.cancel'], - onOk() { - sessionStorage.clear() - _this.props.logout() - _this.props.history.replace('/login') - }, - onCancel() {} - }) - } + // logout = () => { + // // 閫�鍑虹櫥褰� + // let _this = this + // confirm({ + // title: this.state.dict['mob.logout.hint'], + // content: '', + // okText: this.state.dict['mob.confirm'], + // cancelText: this.state.dict['mob.cancel'], + // onOk() { + // sessionStorage.clear() + // _this.props.logout() + // _this.props.history.replace('/login') + // }, + // onCancel() {} + // }) + // } shouldComponentUpdate (nextProps, nextState) { return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) @@ -75,18 +75,18 @@ return ( <header className="menu-header-container"> <div className="header-logo"><img src={this.state.logourl} alt=""/></div> - <Dropdown className="header-setting" overlay={ + {/* <Dropdown className="header-setting" overlay={ <Menu> <Menu.Item key="2" onClick={this.logout}>{this.state.dict['mob.logout']}</Menu.Item> </Menu> - }> - <div> + }> */} + <div className="header-setting"> <img src={this.state.avatar} alt=""/> <span> - <span className="username">{this.state.userName}</span> <Icon type="down" /> + <span className="username">{this.state.userName}</span>{/* <Icon type="down" /> */} </span> </div> - </Dropdown> + {/* </Dropdown> */} </header> ) } -- Gitblit v1.8.0