From d8bfecb86bd90d0fe315be88b980e36691cf0589 Mon Sep 17 00:00:00 2001 From: Zhe Xue <43838425+xz-xuezhe@users.noreply.github.com> Date: Mon, 31 Mar 2025 14:01:47 +0800 Subject: [PATCH] fix: resolve issue of duplicate post creation (#7313) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /area ui /kind bug #### What this PR does / why we need it: See #6994 #### Which issue(s) this PR fixes: Fixes #6994 #### Special notes for your reviewer: 统一了发布文章时的行为,均先确保服务端创建草稿后保存内容。 #### Does this PR introduce a user-facing change? ```release-note 修复文章重复生成的问题 ``` --- ui/uc-src/modules/contents/posts/PostEditor.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/uc-src/modules/contents/posts/PostEditor.vue b/ui/uc-src/modules/contents/posts/PostEditor.vue index cf2d52467..48a4bc40e 100644 --- a/ui/uc-src/modules/contents/posts/PostEditor.vue +++ b/ui/uc-src/modules/contents/posts/PostEditor.vue @@ -168,8 +168,8 @@ const { ); useAutoSaveContent(currentCache, toRef(content.value, "raw"), async () => { - // Do not save when the setting modal is open - if (postSettingEditModal.value) { + // Do not save when the setting modal or the creation modal is open + if (postSettingEditModal.value || postPublishModal.value) { return; } if (isUpdateMode.value) {