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

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

@@ -449,6 +449,7 @@ export class CanvasPhotoEditor {
           type: "success",
           message: "删除成功",
         });
+        this.saveHistory()
         this.isLineDel = false
       });
     } else {
@@ -1402,7 +1403,7 @@ export class CanvasPhotoEditor {
     });
     this.currentIndex++;
     console.log("saveHistory", this.history, this.currentIndex);
-    if (this.history.length > 6) {
+    if (this.history.length > 5) {
       this.history.shift(); // 删除最早的一条
       this.currentIndex--;
     }