mirror of
https://gitee.com/dromara/go-view.git
synced 2025-05-14 15:20:44 +08:00
fix: 解决导出图片白边的问题
This commit is contained in:
parent
2e6c1f2431
commit
79a35423c7
@ -178,7 +178,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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user