From ad34325bab06e37ae219512ed1c7a930d3642cd5 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 25 Aug 2022 15:50:32 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E6=9D=BF=E4=BD=BF=E7=94=A8=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E5=90=8E=E4=BF=9D=E5=AD=98=E6=8C=89=E9=92=AE=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/store/snapshot.js | 3 +++ frontend/src/views/panel/edit/index.vue | 1 + 2 files changed, 4 insertions(+) diff --git a/frontend/src/components/canvas/store/snapshot.js b/frontend/src/components/canvas/store/snapshot.js index d2edd612ab..a36682975e 100644 --- a/frontend/src/components/canvas/store/snapshot.js +++ b/frontend/src/components/canvas/store/snapshot.js @@ -64,6 +64,9 @@ export default { state.changeTimes = 0 state.lastSaveSnapshotIndex = deepCopy(state.snapshotIndex) }, + recordChangeTimes(state) { + state.changeTimes++ + }, recordStyleChange(state) { state.styleChangeTimes++ } diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index f6f0b395fe..3b57490fc1 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -783,6 +783,7 @@ export default { setTimeout(() => { if (useCache) { _this.$store.commit('recordSnapshot', 'cache') + _this.$store.commit('recordChangeTimes' ) } else { _this.$store.commit('refreshSaveStatus') }