1. npm install --save html2canvas

2. import html2canvas from "html2canvas"

3. 

toImage() {
        html2canvas(this.$refs.imageWrapper).then(canvas => {     //imageWrapper转换图片的dom
let dataURL = canvas.toDataURL("image/png"); this.imgUrl = dataURL; if (this.imgUrl !== "") { this.dialogTableVisible = true; } }); }

相关文章:

  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2021-12-05
  • 2021-05-18
猜你喜欢
  • 2022-02-03
  • 2022-01-04
  • 2022-12-23
  • 2021-08-01
  • 2022-01-01
  • 2021-12-18
相关资源
相似解决方案