html2canvas将页面转成照片功能
vue使用html2canvas 生成照片
使用html2canvas
// 生成快照
convertToImage(container, options = {}) {
// 传入dom节点宽高
const width = container.offsetWidth;
const height = container.offsetHeight;
// 设置放大倍数
const scale = window.devicePixelRat
原创
2021-07-09 10:07:31 ·
324 阅读 ·
0 评论