From fde02144db4fb0b2c929e6169ee95ea8c1da08bf Mon Sep 17 00:00:00 2001 From: GouJ Date: Fri, 25 Sep 2026 01:00:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E8=BD=AE=E8=AF=A2=E5=BC=95=E7=94=A8=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/subject-identity/useSubjectIdentity.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/features/subject-identity/useSubjectIdentity.ts b/src/features/subject-identity/useSubjectIdentity.ts index 3448284..51af361 100644 --- a/src/features/subject-identity/useSubjectIdentity.ts +++ b/src/features/subject-identity/useSubjectIdentity.ts @@ -80,13 +80,13 @@ export function useSubjectIdentity() { ) const subject = computed(() => subjects.value.find(item => item.id === selectedId.value)) const selectionKey = computed(() => subject.value?.id ?? '') - let detail!: ReturnType> + const detailRef = {} as { current?: ReturnType> } const detailPollInterval = computed(() => - detail?.data.value?.images.some(image => image.status === 'pending' || image.status === 'generating') + detailRef.current?.data.value?.images.some(image => image.status === 'pending' || image.status === 'generating') ? 4000 : false ) - detail = usePolling( + const detail = usePolling( selectionKey, async (id, signal) => { if (!id) return null @@ -99,6 +99,7 @@ export function useSubjectIdentity() { }, detailPollInterval ) + detailRef.current = detail const identity = computed(() => detail.data.value?.identity ?? null) const images = computed(() => detail.data.value?.images ?? []) const castingItem = computed(() =>