From 5b74ac9cc62993f7a64a6239e81cd52ddf531284 Mon Sep 17 00:00:00 2001 From: CornerSkyless <573196853@qq.com> Date: Thu, 9 Mar 2023 17:59:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=BC=9A=E4=B8=A2=E5=A4=B1=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20(#392)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/chat/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/chat/index.vue b/src/views/chat/index.vue index 2fefff9..9930a12 100644 --- a/src/views/chat/index.vue +++ b/src/views/chat/index.vue @@ -284,7 +284,9 @@ function handleExport() { try { d.loading = true const ele = document.getElementById('image-wrapper') - const canvas = await html2canvas(ele as HTMLDivElement) + const canvas = await html2canvas(ele as HTMLDivElement, { + useCORS: true, + }) const imgUrl = canvas.toDataURL('image/png') const tempLink = document.createElement('a') tempLink.style.display = 'none'