From b468c571396321a8ed71fd9aa69eb85d252811ad Mon Sep 17 00:00:00 2001 From: xiaji Date: Tue, 16 Jun 2026 10:15:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(feed):=20=E6=8A=8A=20wrapper=20=E5=B5=8C?= =?UTF-8?q?=E5=85=A5=20NCard=20=E5=86=85=E9=83=A8=E5=BA=95=E9=83=A8,?= =?UTF-8?q?=E7=9C=9F=E6=AD=A3=E7=B4=A7=E8=B4=B4=E5=AF=B9=E5=BA=94=E5=8D=A1?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/Feed.vue | 112 +++++++++++++++++------------------- 1 file changed, 52 insertions(+), 60 deletions(-) diff --git a/frontend/src/views/Feed.vue b/frontend/src/views/Feed.vue index 068ddc4..f398741 100644 --- a/frontend/src/views/Feed.vue +++ b/frontend/src/views/Feed.vue @@ -44,17 +44,12 @@ let categoryPromptTimer: number | null = null // - items 没这条 → 不渲染(孤儿) // - items 有 + Map 也有 → 渲染 // - items 有 + Map 没 → 不渲染(用户已 dismiss/确认/超时) -const articlesWithPrompts = computed(() => { - const r = items.value.filter((a) => (categoryPromptsByArticle.value.get(a.id)?.length ?? 0) > 0) - // eslint-disable-next-line no-console - console.log('[AWP] resultLen=', r.length, 'itemsLen=', items.value.length, 'mapSize=', categoryPromptsByArticle.value.size) - return r -}) +const articlesWithPrompts = computed(() => + items.value.filter((a) => (categoryPromptsByArticle.value.get(a.id)?.length ?? 0) > 0) +) // 移除某篇文章的所有提示条(8 秒超时 / 确认后 / 过滤变化) function clearPromptsForArticle(articleId: number) { - // eslint-disable-next-line no-console - console.log('[CLEAR_ONE]', articleId, 'stack:', new Error().stack?.split('\n').slice(2, 5).join(' | ')) if (categoryPromptsByArticle.value.has(articleId)) { const next = new Map(categoryPromptsByArticle.value) next.delete(articleId) @@ -64,8 +59,6 @@ function clearPromptsForArticle(articleId: number) { // 全清 function clearAllPrompts() { - // eslint-disable-next-line no-console - console.log('[CLEAR_ALL] size=', categoryPromptsByArticle.value.size, 'stack:', new Error().stack?.split('\n').slice(2, 5).join(' | ')) if (categoryPromptsByArticle.value.size > 0) { categoryPromptsByArticle.value = new Map() } @@ -693,58 +686,57 @@ onMounted(async () => { {{ a.is_read ? '已读' : '标为已读' }} + +
+ +
+ + ✓ 已将《{{ a.title_zh || a.title }}》标记为已读 + +
+ + + + + 全部已读 + + + 稍后再说 + + + +
- -
- -
- - ✓ 已将《{{ a.title_zh || a.title }}》标记为已读 - -
- - - - - 全部已读 - - - 稍后再说 - - - -