Merge pull request #11884 from web677/fix-bug-imgUtils-downloadCanvas-error

fix: imgUtils中downloadCanvas报错
This commit is contained in:
dataeaseShu 2024-08-30 17:27:13 +08:00 committed by GitHub
commit f2bee8b6e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -88,6 +88,7 @@ export function downloadCanvas2(type, canvasDom, name, callBack?) {
const a = document.createElement('a')
a.setAttribute('download', name)
a.href = dataUrl
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
} else {
@ -123,6 +124,7 @@ export function downloadCanvas(type, canvasDom, name, callBack?) {
const a = document.createElement('a')
a.setAttribute('download', name)
a.href = dataUrl
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
} else {