feat: 同步操作更新数据

This commit is contained in:
tbphp
2025-07-23 18:22:36 +08:00
parent 489e2c0c3e
commit 529513f848
3 changed files with 56 additions and 2 deletions

View File

@@ -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;