From 185e4a195cdc40aed77bdcb32b2d8a9c7a4d8a16 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Tue, 5 Mar 2024 14:27:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8B=E8=BD=BD=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/QrCode.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/common/QrCode.vue b/src/components/common/QrCode.vue index 240ac42e..b225f478 100644 --- a/src/components/common/QrCode.vue +++ b/src/components/common/QrCode.vue @@ -90,7 +90,10 @@ onMounted(() => props.duration && setTimeout(() => props.close(), props.duration function download() { html2canvas( document.querySelector(".downloadCode"), - { useCORS: true } + { useCORS: true, + allowTaint: true, + logging: true, + } ).then((canvas) => { let a = document.createElement("a"); a.style.display = "none"; @@ -98,7 +101,7 @@ function download() { a.href = canvas.toDataURL("image/png"); document.body.appendChild(a); a.click(); - }); + }).catch((err) => console.log('html2canvas',err)); } function copyUrl() {