安装并引用
npm install dom-to-image --save import domToImg from 'dom-to-image';
方法:
print(){
domToImg.toPng(document.getElementById('dom'), {}).then(async (res) => {
console.log(res)
}
}
安装并引用
npm install dom-to-image --save import domToImg from 'dom-to-image';
方法:
print(){
domToImg.toPng(document.getElementById('dom'), {}).then(async (res) => {
console.log(res)
}
}