Commit fb93a81f authored by houyu's avatar houyu

删除注释代码

parent e4f920d2
...@@ -338,14 +338,8 @@ ...@@ -338,14 +338,8 @@
return html2canvas(container, ops).then(canvas => { return html2canvas(container, ops).then(canvas => {
// 返回图片的二进制数据 // 返回图片的二进制数据
// return canvas.toDataURL("image/png"); const imgUrl = canvas.toDataURL("image/png");
const imgUrl = canvas.toDataURL("image/png") return imgUrl;
console.log(imgUrl);
document.getElementById("img2").setAttribute('src', imgUrl)
//const a = document.createElement('a')
//a.src = imgUrl
<%--a.setAttribute('download', `chart-download-${name}`)--%>
// a.click()
}); });
} }
const doPrint = async()=>{ const doPrint = async()=>{
...@@ -353,9 +347,9 @@ ...@@ -353,9 +347,9 @@
width: 790, width: 790,
height: 790, height: 790,
scale: 1 scale: 1
}).then(x => { }).then(pic => {
console.log(x); console.log(pic);
document.getElementById("img2").setAttribute('src', pic)
}) })
} }
</script> </script>
......
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