fix: 避免阶段状态刷新变量遮蔽
This commit is contained in:
1 parent
91973415c1
commit
721f7df6cb
1 file changed
+2
-2
@@ -22,8 +22,8 @@ export function useProjectData(id: Ref<string>) {
|
|||||||
async function refreshStageReadiness() {
|
async function refreshStageReadiness() {
|
||||||
const projectId = id.value
|
const projectId = id.value
|
||||||
if (!projectId || !query.data.value) return
|
if (!projectId || !query.data.value) return
|
||||||
const stageReadiness = await projectsApi.stageReadiness(projectId)
|
const nextReadiness = await projectsApi.stageReadiness(projectId)
|
||||||
if (id.value === projectId && query.data.value) query.data.value = { ...query.data.value, stageReadiness }
|
if (id.value === projectId && query.data.value) query.data.value = { ...query.data.value, stageReadiness: nextReadiness }
|
||||||
}
|
}
|
||||||
return { ...query, project, checkpoints, stageReadiness, refreshStageReadiness }
|
return { ...query, project, checkpoints, stageReadiness, refreshStageReadiness }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user