From 496d0f81f565ff5dc7c52edc4f16e01fb1706387 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Fri, 25 Aug 2023 15:21:08 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E4=BD=93=E6=B7=BB=E5=8A=A0=E8=A7=92=E6=A0=87=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【接口定义的请求参数提示优化】 https://www.tapd.cn/55049933/prong/stories/view/1155049933001012739 Signed-off-by: fit2-zhao --- .../request/http/ApiHttpRequestForm.vue | 40 +++++++++++++++++-- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/api-test/frontend/src/business/definition/components/request/http/ApiHttpRequestForm.vue b/api-test/frontend/src/business/definition/components/request/http/ApiHttpRequestForm.vue index a7c53c12be..543577362e 100644 --- a/api-test/frontend/src/business/definition/components/request/http/ApiHttpRequestForm.vue +++ b/api-test/frontend/src/business/definition/components/request/http/ApiHttpRequestForm.vue @@ -53,7 +53,7 @@ - + {{ $t('commons.batch_add') }} + + + {{ $t('api_test.request.body') }} +
+
1
+
+
+
- {{ $t('api_test.definition.request.auth_config') }} + + {{ $t('api_test.definition.request.auth_config') }} +
+
1
+
+
@@ -349,6 +367,21 @@ export default { }); }); }, + showAuthSubscript() { + return this.request.authManager && this.request.authManager.verification !== 'No Auth'; + }, + showSubscript() { + return ( + (this.request.body.kvs && this.request.body.kvs.length > 1) || + this.request.body.raw || + this.request.body.xml || + this.request.body.json || + this.request.body.jsonSchema || + (this.request.body.binary && + this.request.body.binary.length > 0 && + this.request.body.binary[0].files.length > 0) + ); + }, refreshApiParamsField() { let oldActiveName = this.activeName; this.activeName = 'refreshing'; @@ -512,7 +545,7 @@ export default { params.forEach((item) => { if (item) { let line = item.split(/:|:/); - let values = item.substr(line[0].length +1).trim(); + let values = item.substr(line[0].length + 1).trim(); let required = false; keyValues.push( @@ -527,7 +560,6 @@ export default { enable: true, isEdit: false, contentType: 'text/plain', - }) ); }