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')