From db2a062400274dea0f9e2726ffd3d1b03e022ffd Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Sun, 27 Oct 2024 01:04:08 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=A6=81=E6=98=BE=E7=A4=BA=E7=9A=84=E6=96=87?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Tinymce.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Tinymce.vue b/src/components/Tinymce.vue index b9a45b5..345c0db 100644 --- a/src/components/Tinymce.vue +++ b/src/components/Tinymce.vue @@ -138,7 +138,7 @@ const init = reactive({ inputElem.click(); inputElem.onchange = () => { let file = inputElem.files[0]; //获取文件信息 - var xhr, formData; + let xhr, formData; xhr = new XMLHttpRequest(); xhr.withCredentials = false; xhr.open('POST', import.meta.env.VITE_BASE_URL+props.imageUrl); @@ -165,7 +165,7 @@ const init = reactive({ loading.close() const fileUrl = res.data.url; // '?fileId='+res.data.id+ - callback(fileUrl+'?fileName='+res.data.originalFilename, {title: file.name }); + callback(fileUrl+'?fileName='+res.data.originalFilename, {text:file.name ,title: file.name }); }; formData = new FormData(); formData.append('file', file, file.name );