From 1b070e720dc83805ade97e453541f026ecd07453 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 5 Jun 2024 13:57:02 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91canvas=20?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ai/image/ImageTask.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/ai/image/ImageTask.vue b/src/views/ai/image/ImageTask.vue index d109a22c..15a0f206 100644 --- a/src/views/ai/image/ImageTask.vue +++ b/src/views/ai/image/ImageTask.vue @@ -77,7 +77,7 @@ const downloadImage = async (imageUrl) => { const canvas = document.createElement('canvas') canvas.width = image.width canvas.height = image.height - const ctx = canvas.getContext('2d') + const ctx = canvas.getContext('2d') as CanvasDrawImage ctx.drawImage(image, 0, 0, image.width, image.height) const url = canvas.toDataURL('image/png') const a = document.createElement('a')