From 2b4eeb264bdd93b72f72fc7f953d4a9740eb996e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E9=98=94?= Date: Tue, 5 Nov 2024 11:06:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A2=84=E8=A7=88=E7=9A=84?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=AE=BF=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/axios/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/config/axios/index.ts b/src/config/axios/index.ts index b7ee24a..8398528 100644 --- a/src/config/axios/index.ts +++ b/src/config/axios/index.ts @@ -96,5 +96,9 @@ export default { ;(dom.parentNode as any).removeChild(dom) window.URL.revokeObjectURL(_url) }) - } + }, + //预览 + doPreviewFile:(option: AxiosConfig) => { + return request({ method: 'post', ...option,responseType: 'blob', headersType: 'application/json' }) as Promise> + }, }