用vue引入 html2canvas 后,一直报 Element is not attached to a Document
加了定时器调用也一样报错。
后来获取画布元素使用原生获取就可以了。
话不多说,贴代码。
var shareContent = document.getElementById(“draggableWin”);
改成这样获取就生成图片出来了。
关于 vue 中使用html2canvas 遇到报错( Element is not attached to a Document)
最新推荐文章于 2025-04-01 11:52:10 发布
关键词由CSDN通过智能技术生成