fix(接口定义): 修复批量添加请求头未校验空值的缺陷

--bug=1016057 --user=王孝刚
接口测试/接口定义/编辑接口/TEST_在TEST页面的环境配置处点击批量添加,输入key点击确定按钮,弹框关闭后,请求头位置新增一栏,但显示key值为空
https://www.tapd.cn/55049933/s/1228341
This commit is contained in:
wxg0103 2022-08-19 19:52:05 +08:00 committed by f2c-ci-robot[bot]
parent 32e350521f
commit f31e835893
3 changed files with 27 additions and 16 deletions

View File

@ -148,7 +148,7 @@
<el-tooltip class="item-tabs" effect="dark" :content="$t('api_test.request.headers')" placement="top-start"
slot="label">
<span>{{ $t('api_test.request.headers') }}
<div class="el-step__icon is-text ms-api-col" v-if="headers.length>1">
<div class="el-step__icon is-text ms-api-col ms-header" v-if="headers.length>1">
<div class="el-step__icon-inner">{{ headers.length - 1 }}</div>
</div>
</span>
@ -655,4 +655,13 @@ fieldset {
display: none !important;
}
.ms-header {
background: #783887;
color: white;
height: 18px;
font-size: xx-small;
border-radius: 50%;
}
</style>

View File

@ -80,7 +80,7 @@
</el-tooltip>
<el-tooltip effect="dark" :content="$t('schema.adv_setting')" placement="top-start">
<el-button icon="el-icon-setting" circle size="mini" style="margin-left: 10px"
@click="openSetting(scope.row)" v-if="scope.row.type !=='LIST'"/>
@click="openSetting(scope.row)" v-if="scope.row.type !=='LIST'" @change="change"/>
</el-tooltip>
</span>

View File

@ -451,6 +451,7 @@ export default {
let params = data.split("\n");
let keyValues = [];
params.forEach(item => {
if (item) {
let line = item.split(/|:/);
let values = item.split(line[0] + ":");
let required = false;
@ -465,6 +466,7 @@ export default {
enable: true,
contentType: "text/plain"
}));
}
});
return keyValues;
},