1
0
Просмотр исходного кода

更新画布尺寸,历史数据标引会存在错位

tangning 9 часов назад
Родитель
Сommit
cdc1e3ec03
2 измененных файлов с 4 добавлено и 4 удалено
  1. 3 3
      src/view/case/photos/canvas-photo-editor.js
  2. 1 1
      src/view/material/showpages.vue

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

@@ -932,7 +932,7 @@ export class CanvasPhotoEditor {
       ctx.fillText(
         `第 ${pageIndex + 1 + this.pageCount} 页`,
         pageX + this.pageWidth - (20 * this.scale),
-        this.pageHeight - (20 * this.scale)
+        this.pageHeight - (50 * this.scale)
       )
 
       // 绘制图片(重构核心:调用独立方法)
@@ -1584,7 +1584,7 @@ export class CanvasPhotoEditor {
           ctx.fillText(
             `第 ${pageIndex + 1 + this.pageCount} 页`,
             this.pageWidth - (20),
-            this.pageHeight - (20)
+            this.pageHeight - (50)
           )
           // ==========================================
           // 🔥 1:1 还原你原 drawGuideLine 标引逻辑
@@ -1748,7 +1748,7 @@ export class CanvasPhotoEditor {
           ctx.fillText(
             `第 ${pageIndex + 1 + this.pageCount} 页`,
             this.pageWidth - (20),
-            this.pageHeight - (20)
+            this.pageHeight - (50)
           )
           // ==========================================
           // 🔥 1:1 还原你原 drawGuideLine 标引逻辑

+ 1 - 1
src/view/material/showpages.vue

@@ -50,7 +50,7 @@ onMounted(() => {
   if (canvas.value) {
     // 创建编辑器实例
     editor.value = new CanvasPhotoEditor(canvas.value, {
-      pageWidth: 600,
+      pageWidth: 520,
       pageHeight: 840,
       canvasBgColor: "#efefef",
       pageBgColor: "#ffffff",