From faf5d7cbabf6bf68222222c7384da2ebe8d6374a Mon Sep 17 00:00:00 2001 From: ByChen <1343113688@qq.com> Date: Mon, 9 Feb 2026 23:03:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=E6=97=B6=E5=90=8C=E6=AD=A5=E5=88=B7=E6=96=B0=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除标记后需要调用 fetchTags 和 getCurrentTag 来更新标签统计数据,确保界面显示与数据状态一致。 --- src/app/core/main/editor/markdown/md-editor.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/core/main/editor/markdown/md-editor.tsx b/src/app/core/main/editor/markdown/md-editor.tsx index 793ed272e..9b507475f 100644 --- a/src/app/core/main/editor/markdown/md-editor.tsx +++ b/src/app/core/main/editor/markdown/md-editor.tsx @@ -38,6 +38,7 @@ export function MdEditor() { const { currentArticle, saveCurrentArticle, loading, isPulling, activeFilePath, matchPosition, setMatchPosition, setActiveFilePath, loadFileTree, setCurrentArticle, readArticle } = useArticleStore() const { assetsPath, contentTextScale } = useSettingStore() const { fetchMarks } = useMarkStore() + const { fetchTags, getCurrentTag } = useTagStore() const [floatBarPosition, setFloatBarPosition] = useState<{left: number, top: number} | null>(null) const [selectedText, setSelectedText] = useState('') const { theme } = useTheme() @@ -1113,6 +1114,9 @@ export function MdEditor() { await delMark(mark.id) // 刷新记录列表 await fetchMarks() + // 刷新标签统计 + await fetchTags() + getCurrentTag() } } catch (error) { console.error('Failed to delete mark:', error)