From 813c29a2d3d1cbe284c9886bec8a615352db710d Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Sat, 30 Mar 2024 16:43:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E7=9A=84=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1037843 --user=王孝刚 【接口定义】-响应内容-响应体设置为 binary,保存后不展示文件 https://www.tapd.cn/55049933/s/1484550 --- .../components/requestComposition/response/edit.vue | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/frontend/src/views/api-test/components/requestComposition/response/edit.vue b/frontend/src/views/api-test/components/requestComposition/response/edit.vue index d6df68e195..c29ff7db6a 100644 --- a/frontend/src/views/api-test/components/requestComposition/response/edit.vue +++ b/frontend/src/views/api-test/components/requestComposition/response/edit.vue @@ -363,15 +363,9 @@ } }); - async function handleFileChange(files: MsFileItem[]) { - if (!props.uploadTempFileApi) return; - if (files.length === 0) { - activeResponse.value.binaryBody.file = undefined; - emit('change'); - return; - } + async function handleFileChange() { try { - if (fileList.value[0]?.local && fileList.value[0].file) { + if (fileList.value[0]?.local && fileList.value[0].file && props.uploadTempFileApi) { appStore.showLoading(); const res = await props.uploadTempFileApi(fileList.value[0].file); activeResponse.value.body.binaryBody.file = {