0
点赞
收藏
分享

微信扫一扫

html页面长截图或生成pdf

一叶轻舟okok 2022-03-21 阅读 104
javascript

html页面需要生成长截图或者PDF,用html2canvas

import html2canvas from 'html2canvas'
// import jsPDF from 'jspdf'

shotPic() {
   
      const targetDom = document.querySelector('.target-div')
      // 此处是实现滚动元素长截图的关键 start
      const copyDom = targetDom
举报

相关推荐

0 条评论