基于html2canvas+jspdf实现html页面转pdf import html2canvas from "html2canvas"; import JsPDF from "jspdf"; /** * path: src/utils/htmlToPdf.js * name: 导出页面为pdf格式 */ const htmlToPdf = { getPdf(title) { html2canvas(document.querySelector("#pdfDom"), { allowTaint: true, }).then(