html2canvas图片跨域问题
时间:2019-08-29 10:02:27
收藏:0
阅读:973
img添加属性
crossorigin="anonymous"
<img :src="bgurl" class="width100b" crossorigin="anonymous"/>
html2canvas(document.getElementById("lbcc"), {
useCORS: true
}).then(canvas => {
const dataURL = canvas.toDataURL("image/png");
this.dataURL = dataURL;
});
原文:https://www.cnblogs.com/liubingboke/p/11427950.html
评论(0)