fix: 避免阶段状态刷新变量遮蔽

This commit is contained in:
GouJ committed 2026-09-26 21:39:55 +08:00
1 parent 91973415c1
commit 721f7df6cb
1 file changed
+2 -2
+2 -2
View File
@@ -22,8 +22,8 @@ export function useProjectData(id: Ref<string>) {
async function refreshStageReadiness() {
const projectId = id.value
if (!projectId || !query.data.value) return
const stageReadiness = await projectsApi.stageReadiness(projectId)
if (id.value === projectId && query.data.value) query.data.value = { ...query.data.value, stageReadiness }
const nextReadiness = await projectsApi.stageReadiness(projectId)
if (id.value === projectId && query.data.value) query.data.value = { ...query.data.value, stageReadiness: nextReadiness }
}
return { ...query, project, checkpoints, stageReadiness, refreshStageReadiness }
}