From 95d227f70f08c33322d34a40754f5542cbd0ae1a Mon Sep 17 00:00:00 2001 From: xiaji Date: Tue, 16 Jun 2026 09:15:41 +0800 Subject: [PATCH] =?UTF-8?q?debug(feed):=20=E7=BB=99=20articlesWithPrompts?= =?UTF-8?q?=20=E5=8A=A0=20console.log=20=E8=AF=8A=E6=96=AD=20wrapper=20?= =?UTF-8?q?=E4=B8=8D=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/Feed.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/Feed.vue b/frontend/src/views/Feed.vue index 627df45..61e23ba 100644 --- a/frontend/src/views/Feed.vue +++ b/frontend/src/views/Feed.vue @@ -44,9 +44,12 @@ let categoryPromptTimer: number | null = null // - items 没这条 → 不渲染(孤儿) // - items 有 + Map 也有 → 渲染 // - items 有 + Map 没 → 不渲染(用户已 dismiss/确认/超时) -const articlesWithPrompts = computed(() => - items.value.filter((a) => (categoryPromptsByArticle.value.get(a.id)?.length ?? 0) > 0) -) +const articlesWithPrompts = computed(() => { + const result = items.value.filter((a) => (categoryPromptsByArticle.value.get(a.id)?.length ?? 0) > 0) + // eslint-disable-next-line no-console + console.log('[articlesWithPrompts] computed:', { itemsLen: items.value.length, mapSize: categoryPromptsByArticle.value.size, resultLen: result.length, mapEntries: Array.from(categoryPromptsByArticle.value.entries()) }) + return result +}) // 移除某篇文章的所有提示条(8 秒超时 / 确认后 / 过滤变化) function clearPromptsForArticle(articleId: number) {