使用html2canvas时遇到?DOMException:无法在“ ShadowRoot”上设置“ adoptedStyleSheets”属性:不允许在多个文档中共享构造的样式表
html2canvas(document.getElementById('qr-code-content'), {useCORS: true}).then(canvas => {
document.getElementById('qr-code-content').append(canvas);
this.base64ImgData = canvas.toDataURL();
this.sharing = true;
});
Run Code Online (Sandbox Code Playgroud) html2canvas ×1