提交 d58990bb 编写于 作者: C chenjianxing

refactor(接口测试): 不同请求颜色区分

上级 08b973c0
......@@ -9,7 +9,7 @@
<div class="request-type">
{{ request.showType() }}
</div>
<div class="request-method">
<div class="request-method" :style="{'color': getColor(request.enable, request.showMethod())}">
{{ request.showMethod() }}
</div>
<div class="request-name">
......@@ -85,7 +85,13 @@ export default {
selected: 0,
visible: false,
types: RequestFactory.TYPES,
type: ""
type: "",
methodColorMap: new Map([
['GET', "#61AFFE"], ['POST', '#49CC90'], ['PUT', '#fca130'],
['PATCH', '#E2EE11'], ['DELETE', '#f93e3d'], ['OPTIONS', '#0EF5DA'],
['HEAD', '#8E58E7'], ['CONNECT', '#90AFAE'],
['DUBBO', '#C36EEF'],['SQL', '#0AEAD4'],['TCP', '#0A52DF'],
])
}
},
......@@ -156,6 +162,11 @@ export default {
break;
}
},
getColor(enable, method) {
if (enable) {
return this.methodColorMap.get(method);
}
},
select(request) {
if (!request) {
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册