From 49d3eb400a9704337067d702fda2108e7fded217 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 9 Jan 2023 14:21:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=B9=E9=87=8F=E6=B7=BB=E5=8A=A0=E7=89=B9?= =?UTF-8?q?=E6=AE=8A=E6=95=B0=E6=8D=AE=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=90=8E?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=80=BC=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1021677 --user=王孝刚 【接口测试】场景 / 环境变量,批量添加,填写a:a:a,添加后a没有值 https://www.tapd.cn/55049933/s/1324289 --- .../business/automation/scenario/variable/VariableList.vue | 4 ++-- .../definition/components/basis/BatchAddParameterButton.vue | 5 ++--- .../components/request/http/ApiHttpRequestForm.vue | 4 ++-- .../src/components/environment/EnvironmentHttpConfig.vue | 4 ++-- .../components/environment/commons/ApiScenarioVariables.vue | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/api-test/frontend/src/business/automation/scenario/variable/VariableList.vue b/api-test/frontend/src/business/automation/scenario/variable/VariableList.vue index d8a884d42c..686f340435 100644 --- a/api-test/frontend/src/business/automation/scenario/variable/VariableList.vue +++ b/api-test/frontend/src/business/automation/scenario/variable/VariableList.vue @@ -336,13 +336,13 @@ export default { params.forEach((item) => { if (item) { let line = item.split(/:|:/); - let values = item.split(line[0] + ':'); + let values = item.substr(line[0].length + 1); let required = false; keyValues.push( new KeyValue({ name: line[0], required: required, - value: values[1], + value: values, type: 'CONSTANT', valid: false, file: false, diff --git a/api-test/frontend/src/business/definition/components/basis/BatchAddParameterButton.vue b/api-test/frontend/src/business/definition/components/basis/BatchAddParameterButton.vue index 4d87363d09..469633325b 100644 --- a/api-test/frontend/src/business/definition/components/basis/BatchAddParameterButton.vue +++ b/api-test/frontend/src/business/definition/components/basis/BatchAddParameterButton.vue @@ -19,7 +19,7 @@ export default { let keyValues = []; params.forEach((item) => { let line = item.split(/:|:/); - let values = item.split(line[0] + ':'); + let values = item.substr(line[0].length + 1); let required = false; if (line[1] === '必填' || line[1] === 'Required' || line[1] === 'true') { required = true; @@ -28,8 +28,7 @@ export default { new KeyValue({ name: line[0], required: required, - value: values[1], - description: line[3], + value: values, type: 'text', valid: false, file: false, 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 81d04de8c6..991aa5cf09 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 @@ -512,14 +512,14 @@ export default { params.forEach((item) => { if (item) { let line = item.split(/:|:/); - let values = item.split(line[0] + ':'); + let values = item.substr(line[0].length +1); let required = false; keyValues.push( new KeyValue({ name: line[0], required: required, - value: values[1], + value: values, type: 'text', valid: false, file: false, diff --git a/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue b/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue index 76dd55e43d..130e6c6f36 100644 --- a/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue +++ b/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue @@ -474,12 +474,12 @@ export default { params.forEach(item => { if (item) { let line = item.split(/:|:/); - let values = item.split(line[0] + ":"); + let values = item.substr(line[0].length + 1); let required = false; keyValues.push(new KeyValue({ name: line[0], required: required, - value: values[1], + value: values, type: "text", valid: false, file: false, diff --git a/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue b/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue index 7c822a2aa5..17cc7ee859 100644 --- a/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue +++ b/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue @@ -403,13 +403,13 @@ export default { params.forEach((item) => { if (item) { let line = item.split(/:|:/); - let values = item.split(line[0] + ":"); + let values = item.substr(line[0].length + 1); let required = false; keyValues.push( new KeyValue({ name: line[0], required: required, - value: values[1], + value: values, type: "CONSTANT", valid: false, file: false,