html2canvas 白边问题
let doc = document.getElementById("shareInfo");
html2canvas(doc, {
useCORS: true,
height: doc.clientHeight - 2, // 根据具体情况进行调整
width: doc.clientWidth - 2,
}).then((canvas) => {
const newSrc = canvas.toDataURL("image/png");
console.log(newSrc.
原创
2021-09-18 10:56:27 ·
382 阅读 ·
0 评论