mirror of
https://github.com/YMFE/yapi.git
synced 2025-04-12 15:10:23 +08:00
opti: 样式微调
This commit is contained in:
parent
92bdac485d
commit
a30e82cffb
@ -46,6 +46,12 @@ class ErrMsg extends Component {
|
||||
title = '你还没有关注项目呢';
|
||||
desc = <span>先去 <a onClick={() => this.props.history.push('/group')}>“项目广场”</a> 逛逛吧, 那里可以添加关注。</span>;
|
||||
break;
|
||||
case 'noMemberInProject':
|
||||
title = '该项目还没有成员呢';
|
||||
break;
|
||||
case 'noMemberInGroup':
|
||||
title = '该分组还没有成员呢';
|
||||
break;
|
||||
case 'noProject':
|
||||
title = '该分组还没有项目呢';
|
||||
desc = <span>请点击右上角 “<Icon type="plus-circle" />” 按钮新建项目</span>;
|
||||
|
@ -3,6 +3,7 @@
|
||||
font-size: .14rem;
|
||||
line-height: 2;
|
||||
margin-bottom: .24rem;
|
||||
color: rgba(13, 27, 62, 0.43);
|
||||
.icon {
|
||||
font-size: .6rem;
|
||||
margin-bottom: .08rem;
|
||||
|
@ -5,6 +5,7 @@ import { Table, Select, Button, Modal, Row, Col, message, Popconfirm } from 'ant
|
||||
import './MemberList.scss';
|
||||
import { autobind } from 'core-decorators';
|
||||
import { fetchGroupMemberList, fetchGroupMsg, addMember, delMember, changeMemberRole } from '../../../reducer/modules/group.js'
|
||||
import ErrMsg from '../../../components/ErrMsg/ErrMsg.js';
|
||||
import UsernameAutoComplete from '../../../components/UsernameAutoComplete/UsernameAutoComplete.js';
|
||||
const Option = Select.Option;
|
||||
|
||||
@ -230,7 +231,7 @@ class MemberList extends Component {
|
||||
</Col>
|
||||
</Row>
|
||||
</Modal>
|
||||
<Table columns={columns} dataSource={this.state.userInfo} pagination={false} />
|
||||
<Table columns={columns} dataSource={this.state.userInfo} pagination={false} locale={{emptyText: <ErrMsg type="noMemberInGroup"/>}} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ import { Table, Card, Badge, Select, Button, Modal, Row, Col, message, Popconfir
|
||||
import PropTypes from 'prop-types';
|
||||
import { autobind } from 'core-decorators';
|
||||
import { connect } from 'react-redux';
|
||||
import ErrMsg from '../../../../components/ErrMsg/ErrMsg.js';
|
||||
import { fetchGroupMemberList } from '../../../../reducer/modules/group.js';
|
||||
import { getProjectMsg, getProjectMemberList, addMember, delMember, changeMemberRole } from '../../../../reducer/modules/project.js';
|
||||
import UsernameAutoComplete from '../../../../components/UsernameAutoComplete/UsernameAutoComplete.js';
|
||||
@ -214,9 +215,9 @@ class ProjectMember extends Component {
|
||||
</Col>
|
||||
</Row>
|
||||
</Modal>
|
||||
<Table columns={columns} dataSource={this.state.projectMemberList} pagination={false} />
|
||||
<Table columns={columns} dataSource={this.state.projectMemberList} pagination={false} locale={{emptyText: <ErrMsg type="noMemberInProject"/>}} />
|
||||
<Card title={this.state.groupName + ' 分组成员 ' + '(' + this.state.groupMemberList.length + ') 人'} noHovering className="setting-group">
|
||||
{this.state.groupMemberList.map((item, index) => {
|
||||
{this.state.groupMemberList.length ? this.state.groupMemberList.map((item, index) => {
|
||||
return (<div key={index} className="card-item">
|
||||
<img src={location.protocol + '//' + location.host + '/api/user/avatar?uid=' + item.uid} className="item-img" />
|
||||
<p className="item-name">{item.username}</p>
|
||||
@ -224,7 +225,7 @@ class ProjectMember extends Component {
|
||||
{item.role === 'owner' ? <p className="item-role">组长</p> : null}
|
||||
{item.role === 'dev' ? <p className="item-role">开发者</p> : null}
|
||||
</div>);
|
||||
})}
|
||||
}): <ErrMsg type="noMemberInGroup"/>}
|
||||
</Card>
|
||||
</div>
|
||||
)
|
||||
|
@ -93,6 +93,7 @@ class ProjectMessage extends Component {
|
||||
updateProject(assignValue).then((res) => {
|
||||
if (res.payload.data.errcode == 0) {
|
||||
message.success('修改成功! ');
|
||||
// this.props.history.push('/group');
|
||||
} else {
|
||||
message.error(res.payload.data.errmsg);
|
||||
}
|
||||
|
@ -116,4 +116,18 @@
|
||||
background-color: #2395f1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.color {
|
||||
// .ant-radio-button-wrapper {
|
||||
// &:first-child {
|
||||
// border: none;
|
||||
// }
|
||||
// }
|
||||
.ant-radio-button-wrapper-checked {
|
||||
border-radius: 0;
|
||||
&:hover {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user