await html2canvas(getById("winyh"), { height:500, allowTaint: true, useCORS: true, }).then((canvas) => { let base64url = canvas.toDataURL('image/jpeg', 1.0 ); // document.body.appendChild(canvas); });
base64url 就是 待上传到服务端的 url
await html2canvas(getById("winyh"), { height:500, allowTaint: true, useCORS: true, }).then((canvas) => { let base64url = canvas.toDataURL('image/jpeg', 1.0 ); // document.body.appendChild(canvas); });
base64url 就是 待上传到服务端的 url