1.前提:安装 (1)安装npm插件:npm install --save html2canvas (2)在需要用的页面内引入 import html2canvas form "html2canvas" 2.点击事件触发 3.给所打印的地方绑定ref