Commit a9b6af24 authored by 田翔's avatar 田翔

fix: 出件称改

parent 6cb3baa5
Pipeline #89070 passed with stages
......@@ -229,7 +229,7 @@ const QRCodeDesign = (props, ref) => {
console.log('can', can.toDataURL())
let a = document.createElement('a');
a.setAttribute('href', can.toDataURL()); //toDataUrl:将canvas画布信息转化为base64格式图片
a.setAttribute('download', `${row.AccountName}_${row.DeviceCode}`); //这个是必须的,否则会报错
a.setAttribute('download', `${row.DeviceName}_${row.DeviceCode}`); //这个是必须的,否则会报错
a.setAttribute('target', '_self');
a.click();
setLoading(false)
......@@ -340,7 +340,7 @@ const QRCodeDesign = (props, ref) => {
const can = await html2canvas(canvas, { allowTaint: false, useCORS: true, width: 310, scale: 2 })
let img = new Image()
img.src = can.toDataURL('image/png')
zip.file(`${row.AccountName}_${row.DeviceCode}.png`, dataURLtoBlob(img.src))
zip.file(`${row.DeviceName}_${row.DeviceCode}.png`, dataURLtoBlob(img.src))
}
}
zip.generateAsync({ type: 'blob' }).then((res) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment