fix: Reduce the frequency of saving empty pages

This commit is contained in:
LIlGG
2025-10-10 11:29:19 +08:00
parent c5d47c680c
commit 3af1c30d49
3 changed files with 24 additions and 2 deletions

View File

@@ -112,8 +112,11 @@ export class WebBuilderStore {
}
async setDocumentContent(pageName: string, _html: string) {
if (_html.trim() === '') {
return;
}
// 更新内容,但不会触发保存,不会保存至 pages 中。
this.editorStore.updateDocumentContent(pageName, _html ?? '');
this.editorStore.updateDocumentContent(pageName, _html);
}
/**