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'