fix: 合并图库吸顶区域并关闭自动刷新

This commit is contained in:
GouJ committed 2026-09-04 11:38:30 +08:00
1 parent acc0a1e9ad
commit bd66f7e719
16 files changed
+359 -197

No files matched your search

+26 -21
View File
@@ -17,28 +17,32 @@ export function useSubjectImages() {
const limit = ref<number | ''>('')
const promptConcurrency = ref(3)
const promptForce = ref(false)
const query = usePolling(id, async (projectId, signal) => {
if (!projectId) return []
try {
const forms = await subjectImagesApi.listForms(projectId, signal)
if (
forms.some(
form =>
form.subject.projectId !== projectId ||
form.images.some(image => image.subjectFormId !== form.id)
const query = usePolling(
id,
async (projectId, signal) => {
if (!projectId) return []
try {
const forms = await subjectImagesApi.listForms(projectId, signal)
if (
forms.some(
form =>
form.subject.projectId !== projectId ||
form.images.some(image => image.subjectFormId !== form.id)
)
)
)
throw new Error('形态图库返回了不匹配的项目或图片,请刷新后重试。')
return forms
} catch (error) {
if (error instanceof ApiError && error.status === 404)
throw new Error(
'后端尚未提供形态图库查询,请更新后端 dev 并重启服务(GET /projects/:id/subject-forms)。',
{ cause: error }
)
throw error
}
})
throw new Error('形态图库返回了不匹配的项目或图片,请刷新后重试。')
return forms
} catch (error) {
if (error instanceof ApiError && error.status === 404)
throw new Error(
'后端尚未提供形态图库查询,请更新后端 dev 并重启服务(GET /projects/:id/subject-forms)。',
{ cause: error }
)
throw error
}
},
false
)
const forms = computed(() => query.data.value ?? [])
const staleForms = computed(() => forms.value.filter(form => isPrimaryIdentityStale(form)))
const operation = computed(() => getOperation(id.value))
@@ -188,6 +192,7 @@ export function useSubjectImages() {
forms,
staleForms,
query,
refreshProject: context.refresh,
operation,
session,
concurrency,