Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev

This commit is contained in:
suxiaoxin 2017-09-22 15:17:22 +08:00
commit ab30910544
3 changed files with 25 additions and 12 deletions

View File

@ -14,11 +14,11 @@ import Breadcrumb from '../Breadcrumb/Breadcrumb.js'
const MenuUser = (props) => (
<Menu theme="dark" className="user-menu" >
<Menu.Item style={{"background":"#32363a"}} key="0">
<Link to={`/user/profile/${props.uid}`} onClick={props.relieveLink}><Icon type="user"/>个人中心</Link>
<Menu.Item style={{"background":"#32363a",color:"white"}} key="0">
<Link style={{color:"white"}} to={`/user/profile/${props.uid}`} onClick={props.relieveLink}><Icon type="user"/>个人中心</Link>
</Menu.Item>
<Menu.Item key="1">
<a onClick={props.logout}><Icon type="logout" />退出</a>
<Menu.Item key="1">
<a style={{color:"white"}} onClick={props.logout}><Icon type="logout" />退出</a>
</Menu.Item>
</Menu>
);

View File

@ -237,7 +237,7 @@ export default class GroupList extends Component {
<span onClick={this.showModal}>添加分组</span>
</Menu.Item>
// <Icon className="edit-group" onClick={this.showModal} type="plus" title="添加分组" />
const menu = <Menu>
let menu = <Menu>
{
this.props.curUserRole === "admin" ? (editmark) : ''
}
@ -247,19 +247,19 @@ export default class GroupList extends Component {
{
this.props.curUserRole === 'admin' ? (addmark) : ''
}
</Menu>
</Menu>;
menu = currGroup.role ==='owner'?<a className="editSet"><Icon type="setting" onClick={() => this.showModal(TYPE_EDIT)} /></a>:<Dropdown overlay={menu}>
<a className="ant-dropdown-link" href="#">
<Icon type="setting" />
</a>
</Dropdown>;
return (
<div className="m-group">
<div className="group-bar">
<div className="curr-group">
<div className="curr-group-name">
<span className="name">{currGroup.group_name}</span>
<Dropdown overlay={menu}>
<a className="ant-dropdown-link" href="#">
<Icon type="setting" />
</a>
</Dropdown>
{ this.props.curUserRole === "admin" || currGroup.role ==='owner' ? (menu) : '' }
</div>
<div className="curr-group-desc">简介: {currGroup.group_desc}</div>
</div>

View File

@ -32,6 +32,12 @@
text-overflow:ellipsis;
white-space: nowrap;
}
.editSet{
color: rgba(255, 255, 255, 0.85);
&:hover{
color: #2395f1;
}
}
.ant-dropdown-link{
float: right;
display: block;
@ -132,3 +138,10 @@
line-height: 28px;
}
}
.user-menu{
a{
&:hover{
color: #ccc;
}
}
}