fix(接口定义): 修复批量添加请求头未校验空值的缺陷
--bug=1016057 --user=王孝刚 接口测试/接口定义/编辑接口/TEST_在TEST页面的环境配置处点击批量添加,输入key点击确定按钮,弹框关闭后,请求头位置新增一栏,但显示key值为空 https://www.tapd.cn/55049933/s/1228341
This commit is contained in:
parent
32e350521f
commit
f31e835893
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue