From 520f46adc3e10c6a20eafd48fac4454f16cc258c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Mon, 29 Aug 2022 21:37:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=9D=E8=AF=95=E5=A4=84=E7=90=86?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E5=9B=BE=E7=89=87=E6=97=A0=E6=B3=95=E6=88=AA?= =?UTF-8?q?=E5=9B=BE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/utils.ts b/src/utils/utils.ts index b3ffa42f..9d7ae3ae 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -177,7 +177,9 @@ export const canvasCut = (html: HTMLElement | null, callback?: Function) => { } html2canvas(html, { - backgroundColor: null + backgroundColor: null, + allowTaint: true, + useCORS: true }).then((canvas: HTMLCanvasElement) => { window['$message'].success('导出成功!') downloadByA(canvas.toDataURL(), undefined, 'png')