fix: 尝试解决背景图片无法截图的问题

This commit is contained in:
奔跑的面条
2022-08-29 21:35:51 +08:00
parent 801aa1f82f
commit da809f13b3
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -154,7 +154,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')