Closed Summer-andy closed 3 years ago
I met the same case, have you solve it ?
yeah, i use other plugin to replace it.
I found the reason finally,for the dom u choose to use must be in the document (can be seen in page ) ,otherwise U will get 'data:; ' ,if the dom were create by using 'document. createElement' the dom just in the memory ,not in document(page)
在 2021年3月17日,21:15,Andy @.***> 写道:
yeah, i use other plugin to replace it.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
good!
他妈的,中国人,都在上海,讲锤子英语。
domtoimage .toPng(domRef.current, { quality: 0.5 }) .then(function(dataUrl) { console.log(dataUrl); var link = document.createElement('a'); link.download =
card.jpeg
; link.href = dataUrl; link.click(); });dataUrl is 'data:,'