fix(接口测试): 修复场景编辑时上传文件表格不回显的问题

--bug=1025081 --user=宋天阳 [接口测试]接口自动化-编辑场景-请求体中添加本地文件后不回显文件名,保存重新查看正常
https://www.tapd.cn/55049933/s/1358826
This commit is contained in:
song-tianyang 2023-04-03 18:07:15 +08:00 committed by fit2-zhao
parent 760cfae44f
commit d223d69743

View File

@ -525,6 +525,7 @@ export default {
this.storageKey = 'API_RESPONSE_PARAMS_SHOW_FIELD';
}
if (this.parameters.length === 0 || this.parameters[this.parameters.length - 1].name) {
//
this.parameters.push(
new KeyValue({
contentType: 'text/plain',
@ -543,6 +544,24 @@ export default {
value: null,
})
);
} else {
//.(
if (!this.parameters[this.parameters.length - 1].max) {
this.$set(this.parameters[this.parameters.length - 1], 'max', 0);
}
if (!this.parameters[this.parameters.length - 1].min) {
this.$set(this.parameters[this.parameters.length - 1], 'min', 0);
}
if (!this.parameters[this.parameters.length - 1].value) {
this.$set(this.parameters[this.parameters.length - 1], 'value', null);
}
if (!this.parameters[this.parameters.length - 1].uuid) {
this.$set(this.parameters[this.parameters.length - 1], 'uuid', this.uuid());
}
if (!this.parameters[this.parameters.length - 1].description) {
this.$set(this.parameters[this.parameters.length - 1], 'description', null);
}
this.$set(this.parameters[this.parameters.length - 1], 'files', null);
}
let savedApiParamsShowFields = getShowFields(this.storageKey);
if (savedApiParamsShowFields) {