fix(接口测试): 导入的接口文件字段 null 兜底

This commit is contained in:
baiqi 2024-08-13 11:23:00 +08:00 committed by Craftsman
parent 086ecb3caa
commit da4cecfade
1 changed files with 18 additions and 0 deletions

View File

@ -263,6 +263,24 @@
}
);
watch(
() => innerParams.value.formDataBody.formValues,
() => {
if (innerParams.value.formDataBody.formValues.length > 0) {
innerParams.value.formDataBody.formValues = innerParams.value.formDataBody.formValues.map((item) => {
// files null
return {
...item,
files: item.files ? item.files : [],
};
});
}
},
{
immediate: true,
}
);
watch(
() => props.isDebug,
(val) => {