mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev
This commit is contained in:
commit
1eb272bd1a
@ -10,7 +10,8 @@ const Option = AutoComplete.Option;
|
||||
state => {
|
||||
console.log(state);
|
||||
return {
|
||||
curUid: state.login.uid + ''
|
||||
curUid: state.login.uid + '',
|
||||
curUserName: state.login.userName
|
||||
}
|
||||
}
|
||||
)
|
||||
@ -26,7 +27,8 @@ class LeftMenu extends Component {
|
||||
}
|
||||
|
||||
static propTypes = {
|
||||
curUid: PropTypes.string
|
||||
curUid: PropTypes.string,
|
||||
curUserName: PropTypes.string
|
||||
}
|
||||
|
||||
//延迟搜索
|
||||
@ -80,6 +82,9 @@ class LeftMenu extends Component {
|
||||
|
||||
const { dataSource } = this.state;
|
||||
return (<div className="user-list">
|
||||
<div className='cur-user'>
|
||||
<div className='user-name'><span>用户名 : </span>{`${this.props.curUserName}`}</div>
|
||||
</div>
|
||||
<Row type="flex" justify="start" className="search">
|
||||
<Col span="24">
|
||||
<div className="certain-category-search-wrapper" style={{ width: "100%" }}>
|
||||
@ -98,7 +103,7 @@ class LeftMenu extends Component {
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
<Menu defaultSelectedKeys={[location.hash]}>
|
||||
<Menu mode='inline' defaultSelectedKeys={[location.hash]}>
|
||||
{content}
|
||||
</Menu>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { Component } from 'react'
|
||||
import { Row, Col, Icon, Input, Button, Select, message } from 'antd'
|
||||
import { Row, Col, Input, Button, Select, message } from 'antd'
|
||||
import axios from 'axios';
|
||||
import {formatTime} from '../../common.js'
|
||||
import PropTypes from 'prop-types'
|
||||
@ -131,7 +131,8 @@ class Profile extends Component {
|
||||
if (this.state.usernameEdit === false) {
|
||||
userNameEditHtml = <div >
|
||||
<span className="text">{userinfo.username}</span>
|
||||
<span className="text-button" onClick={() => { this.handleEdit('usernameEdit', true) }}><Icon type="edit" />修改</span>
|
||||
{/*<span className="text-button" onClick={() => { this.handleEdit('usernameEdit', true) }}><Icon type="edit" />修改</span>*/}
|
||||
<Button size={'small'} icon="edit" onClick={() => { this.handleEdit('usernameEdit', true) }}>修改</Button>
|
||||
</div>
|
||||
} else {
|
||||
userNameEditHtml = <div>
|
||||
@ -146,7 +147,8 @@ class Profile extends Component {
|
||||
if (this.state.emailEdit === false) {
|
||||
emailEditHtml = <div >
|
||||
<span className="text">{userinfo.email}</span>
|
||||
<span className="text-button" onClick={() => { this.handleEdit('emailEdit', true) }} ><Icon type="edit" />修改</span>
|
||||
{/*<span className="text-button" onClick={() => { this.handleEdit('emailEdit', true) }} ><Icon type="edit" />修改</span>*/}
|
||||
<Button size={'small'} icon="edit" onClick={() => { this.handleEdit('emailEdit', true) }}>修改</Button>
|
||||
</div>
|
||||
} else {
|
||||
emailEditHtml = <div>
|
||||
@ -161,7 +163,8 @@ class Profile extends Component {
|
||||
if (this.state.roleEdit === false) {
|
||||
roleEditHtml = <div>
|
||||
<span className="text">{roles[userinfo.role]}</span>
|
||||
<span className="text-button" onClick={() => { this.handleEdit('roleEdit', true) }} ><Icon type="edit" />修改</span>
|
||||
{/*<span className="text-button" onClick={() => { this.handleEdit('roleEdit', true) }} ><Icon type="edit" />修改</span>*/}
|
||||
<Button size={'small'} icon="edit" onClick={() => { this.handleEdit('roleEdit', true) }}>修改</Button>
|
||||
</div>
|
||||
} else {
|
||||
roleEditHtml = <Select defaultValue={_userinfo.role} onChange={ this.changeRole} style={{ width: 150 }} >
|
||||
|
@ -6,7 +6,7 @@
|
||||
margin: .88rem auto 0 auto;
|
||||
// font-size: 0.14rem;
|
||||
|
||||
min-height:433px;
|
||||
|
||||
margin-top: 40px;
|
||||
margin-bottom: 55px;
|
||||
|
||||
@ -23,10 +23,21 @@
|
||||
}
|
||||
ul{border:none}
|
||||
}
|
||||
|
||||
.user-name{
|
||||
padding: 10px 0px;
|
||||
text-align: center;
|
||||
background-color: #34495e;
|
||||
color: white;
|
||||
span{
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.router-content{
|
||||
min-height:calc(100% - 2.47rem);
|
||||
}
|
||||
.user-table {
|
||||
-webkit-box-flex: 1;
|
||||
padding: 15px;
|
||||
padding: 24px;
|
||||
margin-left: 15px;
|
||||
border-radius:5px;
|
||||
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.20);
|
||||
|
Loading…
Reference in New Issue
Block a user