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
999a9cacf7
@ -19,8 +19,11 @@
|
||||
.table-interfacelist {
|
||||
margin-top: .2rem;
|
||||
white-space: nowrap;
|
||||
table {
|
||||
table-layout: fixed;
|
||||
}
|
||||
.path {
|
||||
width: 400px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow:ellipsis;
|
||||
white-space: nowrap;
|
||||
@ -45,14 +48,3 @@
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
.table-interfacelist .path {
|
||||
width: 360px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 980px) {
|
||||
.table-interfacelist .path {
|
||||
width: 280px;
|
||||
}
|
||||
}
|
||||
|
@ -104,6 +104,7 @@ class InterfaceList extends Component {
|
||||
title: '接口名称',
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
width: 30,
|
||||
sorter: (a, b) => {
|
||||
return a.title.localeCompare(b.title) === 1
|
||||
},
|
||||
@ -115,7 +116,7 @@ class InterfaceList extends Component {
|
||||
title: '接口路径',
|
||||
dataIndex: 'path',
|
||||
key: 'path',
|
||||
width: 400,
|
||||
width: 50,
|
||||
render: (item) => {
|
||||
const path = this.props.curProject.basepath + item;
|
||||
return <Tooltip title={path} placement="topLeft" overlayClassName="toolTip"><span className="path">{path}</span></Tooltip>
|
||||
@ -124,7 +125,7 @@ class InterfaceList extends Component {
|
||||
title: '请求方法',
|
||||
dataIndex: 'method',
|
||||
key: 'method',
|
||||
width: 100,
|
||||
width: 12,
|
||||
render: (item) => {
|
||||
let methodColor = variable.METHOD_COLOR[item ? item.toLowerCase() : 'get'];
|
||||
return <span style={{color:methodColor.color,backgroundColor:methodColor.bac}} className="colValue">{item}</span>
|
||||
@ -133,7 +134,7 @@ class InterfaceList extends Component {
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
width: 100,
|
||||
width: 12,
|
||||
render: (item) => {
|
||||
return <div>{item === 'done' ?
|
||||
<Tag color="#87d068">完成</Tag>
|
||||
@ -157,9 +158,9 @@ class InterfaceList extends Component {
|
||||
});
|
||||
|
||||
return (
|
||||
<div style={{ padding: "16px" }}>
|
||||
<div style={{ padding: '16px' }}>
|
||||
<h2 style={{ display: 'inline-block'}}>接口列表</h2>
|
||||
<Button style={{float: "right", marginRight: '10px'}} type="primary" onClick={() => this.setState({ visible: true })}>添加接口</Button>
|
||||
<Button style={{float: 'right'}} type="primary" onClick={() => this.setState({ visible: true })}>添加接口</Button>
|
||||
<Table className="table-interfacelist" pagination={false} columns={columns} onChange={this.handleChange} dataSource={data} />
|
||||
<Modal
|
||||
title="添加接口"
|
||||
|
Loading…
Reference in New Issue
Block a user