revert: 代码回退

This commit is contained in:
wangjiahao 2022-08-19 16:03:45 +08:00
parent f80b760326
commit 216b7cea98

View File

@ -17,6 +17,9 @@ export default {
state.styleChangeTimes++
state.cacheStyleChangeTimes++
},
canvasCacheChange(state) {
state.cacheStyleChangeTimes++
},
undo(state) {
store.commit('setCurComponent', { component: null, index: null })
if (state.snapshotIndex > 0) {
@ -38,7 +41,7 @@ export default {
},
recordSnapshot(state) {
console.log('recordSnapshot')
state.cacheStyleChangeTimes++
state.changeTimes++
// 添加新的快照
state.snapshotData[++state.snapshotIndex] = deepCopy(state.componentData)