From 2a2a81772da4fcd9ac854c1f4abdbdbb363a7403 Mon Sep 17 00:00:00 2001 From: GouJ Date: Sat, 26 Sep 2026 21:15:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A1=B9=E7=9B=AE=E4=B8=8A=E4=B8=8B?= =?UTF-8?q?=E6=96=87=E5=85=B1=E4=BA=AB=E5=88=B6=E4=BD=9C=E9=98=B6=E6=AE=B5?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/projects/context.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/features/projects/context.ts b/src/features/projects/context.ts index aed198f..508607d 100644 --- a/src/features/projects/context.ts +++ b/src/features/projects/context.ts @@ -8,15 +8,17 @@ import type { Ref } from 'vue' /** 同一项目的各个 graph 共用一份查询,避免每个面板重复请求。 */ export function useProjectData(id: Ref) { const query = useQuery(id, async (projectId, signal) => { - const [project, checkpoints] = await Promise.all([ + const [project, checkpoints, stageReadiness] = await Promise.all([ projectsApi.detail(projectId, signal), - projectsApi.checkpoints(projectId, signal) + projectsApi.checkpoints(projectId, signal), + projectsApi.stageReadiness(projectId, signal) ]) - return { project, checkpoints } + return { project, checkpoints, stageReadiness } }) const project = computed(() => query.data.value?.project ?? null) const checkpoints = computed(() => query.data.value?.checkpoints ?? []) - return { ...query, project, checkpoints } + const stageReadiness = computed(() => query.data.value?.stageReadiness ?? null) + return { ...query, project, checkpoints, stageReadiness } } /** 项目布局向子页面提供的类型安全上下文。 */