1
0
tangning 17 часов назад
Родитель
Сommit
684988c716
1 измененных файлов с 6 добавлено и 4 удалено
  1. 6 4
      src/view/case/photos/canvas-photo-editor.js

+ 6 - 4
src/view/case/photos/canvas-photo-editor.js

@@ -1547,12 +1547,13 @@ export class CanvasPhotoEditor {
               }
 
               // 文字
+              ctx.fillStyle = "#000";
               const text = photo.name || "说明文字";
               this.drawCenteredTextWithEllipsis(
                 ctx, text,
                 coord.x + coord.width / 2,
                 coord.y + coord.height + 40,
-                coord.width - 20, 24, 2, "16px Microsoft Yahei"
+                coord.width - 20, 24, 2, "14pt 宋体"
               );
 
               // 虚线框
@@ -1744,12 +1745,13 @@ async exportPagesAsImages(paperType = "a4", name, fileType = 'pdf') {
             }
 
             // 文字
+            ctx.fillStyle = "#000";
             const text = photo.name || "说明文字";
             this.drawCenteredTextWithEllipsis(
               ctx, text,
               coord.x + coord.width / 2,
               coord.y + coord.height + 40,
-              coord.width - 20, 24, 2, "16px Microsoft Yahei"
+              coord.width - 20, 24, 2, "14pt 宋体"
             );
 
             ctx.setLineDash([1, 1]);
@@ -1820,8 +1822,8 @@ async exportPagesAsImages(paperType = "a4", name, fileType = 'pdf') {
       });
 
       // 转图片并加入 ZIP
-      const base64 = pageCanvas.toDataURL("image/png");
-      zip.file(`第${groupIndex + 1}张.png`, base64.split(",")[1], { base64: true });
+      const base64 = pageCanvas.toDataURL("image/jpeg");
+      zip.file(`第${groupIndex + 1}张.jpg`, base64.split(",")[1], { base64: true });
     }
 
     // 下载