fix(接口测试): 修复请求体参数批量添加参数有问题的缺陷

--bug=1025810 --user=王孝刚
【接口测试】接口定义-编辑接口-请求体-(form-data)-批量添加-添加多条不同内容只显示最后一条
https://www.tapd.cn/55049933/s/1366746
This commit is contained in:
wxg0103 2023-04-26 10:18:56 +08:00 committed by fit2-zhao
parent b0192a7a20
commit e26a4f6761
1 changed files with 3 additions and 5 deletions

View File

@ -354,16 +354,14 @@ export default {
let keyValues = []; let keyValues = [];
params.forEach((item) => { params.forEach((item) => {
if (item) { if (item) {
let line = []; let line = item.split(/|:/);
line[0] = item.substring(0, item.indexOf(/|:/)).trim(); let values = item.substr(line[0].length +1).trim();
line[1] = item.substring(item.indexOf(/|:/) + 1, item.length).trim();
let required = false; let required = false;
keyValues.push( keyValues.push(
new KeyValue({ new KeyValue({
name: line[0], name: line[0],
required: required, required: required,
value: line[1], value: values,
description: line[2],
type: 'text', type: 'text',
valid: false, valid: false,
file: false, file: false,