let canvas: HTMLCanvasElement = qr.value?.$el;
let url = canvas.toDataURL(“image/png”);
const adom: HTMLAnchorElement = document.createElement(“a”);
adom.href = url;
adom.download = qrCode.value + “.png”;
document.querySelector(“body”)?.appendChild(adom);
adom.click();
document.querySelector(“body”)?.removeChild(adom);
canvas生成二维码
最新推荐文章于 2024-06-28 17:37:52 发布