记react比较好用的插件及使用方法,不常用的功能性代码(最新更新时间 2023-8-23)
一、html存储为pdf
// 参考地址:https://blog.youkuaiyun.com/weixin_48003149/article/details/121333196
//先安装这两个插件
import jsPDF from 'jspdf'
import html2canvas from 'html2canvas';
const handleExportPdf = async (refs) => {
///refs是个对象,里面是需要保存为pdf的ref,ref只能是原始元素,比如说div,不能是组件
原创
2022-06-01 15:03:01 ·
1681 阅读 ·
0 评论