tangning 2 日 前
コミット
cdf83210e4

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

@@ -1514,9 +1514,13 @@ export class CanvasPhotoEditor {
           const layout = this.getItemSize(page.layoutMode);
           const coords = this.getCoordinate(0, layout);
 
-          coords.forEach((coord, i) => {
-            const photoId = page.list[i];
-            const photo = this.photos.find(p => p.id === photoId);
+          coords.forEach((coord, q) => {
+            const photoId = page.list[q];
+            let imgItem = this.photos.find(p => p.id === photoId)
+            const photo = {
+              ...imgItem,
+              ...page.item[q],
+            }
 
             // 相框底板
             ctx.fillStyle = "#D9D9D9";
@@ -1712,7 +1716,11 @@ async exportPagesAsImages(paperType = "a4", name, fileType = 'pdf') {
 
         coords.forEach((coord, i) => {
           const photoId = page.list[i];
-          const photo = this.photos.find((p) => p.id === photoId);
+          let imgItem = this.photos.find(p => p.id === photoId)
+          const photo = {
+            ...imgItem,
+            ...page.item[i],
+          }
 
           ctx.fillStyle = "#D9D9D9";
           ctx.fillRect(coord.x, coord.y, coord.width, coord.height);

+ 1 - 1
src/view/case/photos/index.vue

@@ -537,7 +537,7 @@ const insertBlankPage = throttle((direction) => {
   if (editor.value) {
     pages.value = editor.value.insertBlankPage(direction);
   }
-}, 100);
+}, 500);
 
 const changeIndexing = async () => {
   indexing.value = !indexing.value;