feat: 用缓存处理对话中的项目切换问题

This commit is contained in:
2026-04-02 10:05:29 +08:00
parent b205633d0d
commit 836431788a
15 changed files with 208 additions and 51 deletions

View File

@@ -276,7 +276,7 @@ export class StateManager {
}
/** 撤回状态 */
undoState() {
var index = this.historyIndex.value - 1
const index = this.historyIndex.value - 1
const state = this.historyList.value[index]
if (!state) return
this.historyIndex.value = index
@@ -285,7 +285,7 @@ export class StateManager {
}
/** 重做状态 */
redoState() {
var index = this.historyIndex.value + 1
const index = this.historyIndex.value + 1
const state = this.historyList.value[index]
if (!state) return
this.historyIndex.value = index