From 529513f84869d8a6d0a657c6f57ef3cbed06a4fb Mon Sep 17 00:00:00 2001 From: tbphp Date: Wed, 23 Jul 2025 18:22:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=8C=E6=AD=A5=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/keys/GroupInfoCard.vue | 17 ++++++++++++++++ web/src/components/keys/KeyTable.vue | 24 +++++++++++++++++++++-- web/src/utils/app-state.ts | 17 ++++++++++++++++ 3 files changed, 56 insertions(+), 2 deletions(-) diff --git a/web/src/components/keys/GroupInfoCard.vue b/web/src/components/keys/GroupInfoCard.vue index 227b689..c75ca50 100644 --- a/web/src/components/keys/GroupInfoCard.vue +++ b/web/src/components/keys/GroupInfoCard.vue @@ -78,6 +78,23 @@ watch( } ); +// 监听同步操作完成事件,自动刷新当前分组数据 +watch( + () => appState.syncOperationTrigger, + () => { + // 检查是否需要刷新当前分组的数据 + if (appState.lastSyncOperation && props.group) { + // 通过分组名称匹配 + const isCurrentGroup = appState.lastSyncOperation.groupName === props.group.name; + + if (isCurrentGroup) { + // 刷新当前分组的统计数据 + loadStats(); + } + } + } +); + async function loadStats() { if (!props.group?.id) { stats.value = null; diff --git a/web/src/components/keys/KeyTable.vue b/web/src/components/keys/KeyTable.vue index a5fe5da..a1fcd25 100644 --- a/web/src/components/keys/KeyTable.vue +++ b/web/src/components/keys/KeyTable.vue @@ -1,7 +1,7 @@