fix:解决截图有白边的问题

This commit is contained in:
奔跑的面条
2022-06-09 08:48:28 +08:00
parent 3c820d53a6
commit 1252d266dd
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -155,7 +155,9 @@ export const canvasCut = (html: HTMLElement | null, callback?: Function) => {
return
}
html2canvas(html).then((canvas: HTMLCanvasElement) => {
html2canvas(html, {
backgroundColor: null
}).then((canvas: HTMLCanvasElement) => {
window['$message'].success('导出成功!')
downloadByA(canvas.toDataURL(), undefined, 'png')
if (callback) callback()