Ver código fonte

标引删除保存

tangning 6 dias atrás
pai
commit
fa5af17012
1 arquivos alterados com 2 adições e 1 exclusões
  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",
           type: "success",
           message: "删除成功",
           message: "删除成功",
         });
         });
+        this.saveHistory()
         this.isLineDel = false
         this.isLineDel = false
       });
       });
     } else {
     } else {
@@ -1402,7 +1403,7 @@ export class CanvasPhotoEditor {
     });
     });
     this.currentIndex++;
     this.currentIndex++;
     console.log("saveHistory", this.history, this.currentIndex);
     console.log("saveHistory", this.history, this.currentIndex);
-    if (this.history.length > 6) {
+    if (this.history.length > 5) {
       this.history.shift(); // 删除最早的一条
       this.history.shift(); // 删除最早的一条
       this.currentIndex--;
       this.currentIndex--;
     }
     }