소스 검색

feat: 图片跨域问题

zhangjie 6 달 전
부모
커밋
1b356e4547
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/plugins/htmlToPdf.js

+ 1 - 1
src/plugins/htmlToPdf.js

@@ -18,7 +18,7 @@ export async function buildPdf(
 ) {
   const opt = {
     margin: 0,
-    html2canvas: { scale: 6 },
+    html2canvas: { scale: 6, useCORS: true },
     filename: filename || "",
     image: { type: "jpeg", quality: 0.8 },
     jsPDF: {