From d455dc18a98176ee88134640516791050f1df933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Fri, 11 Sep 2026 19:03:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E5=AE=9E=E9=99=85=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=BF=AB=E7=85=A7=E6=9B=B4=E6=96=B0=E8=84=8F=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E7=AD=BE=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 保存成功后直接记录持久化快照签名,避免闭包中的旧编辑器状态阻止清脏。 --- .../src/view/ui-editor/useUiEditorPage.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/ai-game-creator-shell/src/view/ui-editor/useUiEditorPage.ts b/apps/ai-game-creator-shell/src/view/ui-editor/useUiEditorPage.ts index 42678d63e..561c237c9 100644 --- a/apps/ai-game-creator-shell/src/view/ui-editor/useUiEditorPage.ts +++ b/apps/ai-game-creator-shell/src/view/ui-editor/useUiEditorPage.ts @@ -1330,9 +1330,7 @@ export function useUiEditorSession( return false; } setPersistedRevision(result.revision); - if (JSON.stringify(editor.state) === snapshotSignature) { - setSavedStateSignature(snapshotSignature); - } + setSavedStateSignature(snapshotSignature); return true; }); } catch { @@ -1401,9 +1399,7 @@ export function useUiEditorSession( return null; } setPersistedRevision(saved.revision); - if (JSON.stringify(editor.state) === snapshotSignature) { - setSavedStateSignature(snapshotSignature); - } + setSavedStateSignature(snapshotSignature); return await stateStore.generateCode(resourceId); }); } catch (cause) {