From f31e83589355c58dd14a7dd48076aef83c5a2385 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Fri, 19 Aug 2022 19:52:05 +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=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=A4=B4=E6=9C=AA=E6=A0=A1=E9=AA=8C=E7=A9=BA=E5=80=BC?= =?UTF-8?q?=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=1016057 --user=王孝刚 接口测试/接口定义/编辑接口/TEST_在TEST页面的环境配置处点击批量添加,输入key点击确定按钮,弹框关闭后,请求头位置新增一栏,但显示key值为空 https://www.tapd.cn/55049933/s/1228341 --- .../scenario/variable/VariableList.vue | 11 ++++++- .../environment/ApiScenarioVariables.vue | 2 +- .../environment/EnvironmentHttpConfig.vue | 30 ++++++++++--------- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/variable/VariableList.vue b/frontend/src/business/components/api/automation/scenario/variable/VariableList.vue index d28c214ca1..cef6cefeb8 100644 --- a/frontend/src/business/components/api/automation/scenario/variable/VariableList.vue +++ b/frontend/src/business/components/api/automation/scenario/variable/VariableList.vue @@ -148,7 +148,7 @@ {{ $t('api_test.request.headers') }} -
+
{{ headers.length - 1 }}
@@ -655,4 +655,13 @@ fieldset { display: none !important; } +.ms-header { + background: #783887; + color: white; + height: 18px; + font-size: xx-small; + border-radius: 50%; +} + + diff --git a/frontend/src/business/components/api/test/components/environment/ApiScenarioVariables.vue b/frontend/src/business/components/api/test/components/environment/ApiScenarioVariables.vue index 1ef9f6e9d6..20981239fb 100644 --- a/frontend/src/business/components/api/test/components/environment/ApiScenarioVariables.vue +++ b/frontend/src/business/components/api/test/components/environment/ApiScenarioVariables.vue @@ -80,7 +80,7 @@ + @click="openSetting(scope.row)" v-if="scope.row.type !=='LIST'" @change="change"/> diff --git a/frontend/src/business/components/api/test/components/environment/EnvironmentHttpConfig.vue b/frontend/src/business/components/api/test/components/environment/EnvironmentHttpConfig.vue index 5c7f141656..cb0cabc06d 100644 --- a/frontend/src/business/components/api/test/components/environment/EnvironmentHttpConfig.vue +++ b/frontend/src/business/components/api/test/components/environment/EnvironmentHttpConfig.vue @@ -451,20 +451,22 @@ export default { let params = data.split("\n"); let keyValues = []; params.forEach(item => { - let line = item.split(/:|:/); - let values = item.split(line[0] + ":"); - let required = false; - keyValues.push(new KeyValue({ - name: line[0], - required: required, - value: values[1], - type: "text", - valid: false, - file: false, - encode: true, - enable: true, - contentType: "text/plain" - })); + if (item) { + let line = item.split(/:|:/); + let values = item.split(line[0] + ":"); + let required = false; + keyValues.push(new KeyValue({ + name: line[0], + required: required, + value: values[1], + type: "text", + valid: false, + file: false, + encode: true, + enable: true, + contentType: "text/plain" + })); + } }); return keyValues; },