html2canvas图片跨域

html2canvas图片跨域
allowTaint false Whether to allow cross-origin images to taint the canvas
默认是false

    <div id="capture"  >
        <h4 style="color: #000; ">Hello world!</h4>
        <img src="http://thirdwx.qlogo.cn/mmopen/H1d1jwBqG4QzZf8kHtJ5LLer7bCvBJ1aDbOFrFuhCibQTlhhDNicxjWXXRbGN49jUiaicmDrc1icGp7YdENUvicogsf4wIHrDOcAV7/132">
    </div>
html2canvas(document.querySelector("#capture"),{allowTaint:true}).then(canvas => {
    document.body.appendChild(canvas)
});
来都来了,留个言吧🙂