mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-24 02:02:55 +08:00
--fix bug
This commit is contained in:
@@ -86,12 +86,10 @@ function download() {
|
|||||||
document.querySelector(".downloadCode"),
|
document.querySelector(".downloadCode"),
|
||||||
{ useCORS: true }
|
{ useCORS: true }
|
||||||
).then((canvas) => {
|
).then((canvas) => {
|
||||||
let filename = `${new Date().getTime()}.png`;
|
|
||||||
let imageUrl = canvas.toDataURL("image/png");
|
|
||||||
let a = document.createElement("a");
|
let a = document.createElement("a");
|
||||||
a.style.display = "none";
|
a.style.display = "none";
|
||||||
a.download = filename;
|
a.download = `${new Date().getTime()}.png`;
|
||||||
a.href = imageUrl;
|
a.href = canvas.toDataURL("image/png");
|
||||||
document.body.appendChild(a);
|
document.body.appendChild(a);
|
||||||
a.click();
|
a.click();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user