fix(接口测试): 导入的接口文件字段 null 兜底
This commit is contained in:
parent
086ecb3caa
commit
da4cecfade
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue