mirror of
https://github.com/YMFE/yapi.git
synced 2025-03-07 14:16:52 +08:00
feat: 测试集合页面布局调整
This commit is contained in:
parent
bb9d313639
commit
5d697ce7ff
@ -127,9 +127,9 @@ class InterfaceColContent extends Component {
|
||||
status = 'ok';
|
||||
} else if (result.code === 1) {
|
||||
status = 'invalid'
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
status = 'error';
|
||||
status = 'error';
|
||||
result = e;
|
||||
}
|
||||
this.reports[curitem._id] = result;
|
||||
@ -177,7 +177,7 @@ class InterfaceColContent extends Component {
|
||||
headers: that.getHeadersObj(interfaceData.req_headers),
|
||||
data: interfaceData.req_body_type === 'form' ? that.arrToObj(interfaceData.req_body_form) : interfaceData.req_body_other,
|
||||
success: (res, header) => {
|
||||
res = json_parse(res);
|
||||
res = json_parse(res);
|
||||
result.res_header = header;
|
||||
result.res_body = res;
|
||||
if (res && typeof res === 'object') {
|
||||
@ -206,7 +206,7 @@ class InterfaceColContent extends Component {
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
|
||||
|
||||
err = err || '请求异常';
|
||||
result.code = 400;
|
||||
result.res_header = header;
|
||||
@ -442,7 +442,7 @@ class InterfaceColContent extends Component {
|
||||
|
||||
return (
|
||||
<div className="interface-col">
|
||||
<h2 style={{ marginBottom: '10px', display: 'inline-block' }}>测试集合 <a target="_blank" rel="noopener noreferrer" href="https://yapi.ymfe.org/case.html" >
|
||||
<h2 className="interface-title" style={{ display: 'inline-block', margin: 0, marginBottom: '16px' }}>测试集合 <a target="_blank" rel="noopener noreferrer" href="https://yapi.ymfe.org/case.html" >
|
||||
<Tooltip title="点击查看文档"><Icon type="question-circle-o" /></Tooltip>
|
||||
</a></h2>
|
||||
<Button type="primary" style={{ float: 'right' }} onClick={this.executeTests}>开始测试</Button>
|
||||
@ -478,4 +478,4 @@ class InterfaceColContent extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
export default InterfaceColContent
|
||||
export default InterfaceColContent
|
||||
|
@ -89,12 +89,11 @@
|
||||
}
|
||||
|
||||
.interface-col{
|
||||
padding: 16px;
|
||||
padding: 24px;
|
||||
.interface-col-table-header{
|
||||
background-color: rgb(238, 238, 238);
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
font-size:14px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user