From 210443c833b453319cddc782dda14e14ac261f65 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 19 Jun 2026 18:29:16 -0700 Subject: [PATCH] =?UTF-8?q?feat(im):=20=E4=BC=98=E5=8C=96=E5=85=8D?= =?UTF-8?q?=E6=89=93=E6=89=B0=E4=BC=9A=E8=AF=9D=E6=9C=AA=E8=AF=BB=E5=B1=95?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 免打扰会话保留头像小红点提示 - 会话预览行展示免打扰未读条数 - 总未读统计继续排除免打扰会话 - 同步 Vue3 + Vben 三端会话项展示 --- .../conversation/conversation-item.vue | 20 +++++++++++++++++-- .../conversation/conversation-item.vue | 20 +++++++++++++++++-- .../conversation/conversation-item.vue | 20 +++++++++++++++++-- 3 files changed, 54 insertions(+), 6 deletions(-) diff --git a/apps/web-antd/src/views/im/home/pages/conversation/components/conversation/conversation-item.vue b/apps/web-antd/src/views/im/home/pages/conversation/components/conversation/conversation-item.vue index 938146e67..6911ba1c4 100644 --- a/apps/web-antd/src/views/im/home/pages/conversation/components/conversation/conversation-item.vue +++ b/apps/web-antd/src/views/im/home/pages/conversation/components/conversation/conversation-item.vue @@ -116,6 +116,15 @@ const atText = computed(() => { return '' }) +/** 免打扰会话未读条数文案 */ +const mutedUnreadText = computed(() => { + if (!props.conversation.silent || props.conversation.unreadCount <= 0) { + return '' + } + const count = props.conversation.unreadCount > 99 ? '99+' : props.conversation.unreadCount + return `[${count}条]` +}) + /** 群聊未处理加群申请红字前缀;store 已经按「我管理的群」过滤过,count > 0 即可显示 */ const requestText = computed(() => { if (!isGroup.value) { @@ -204,7 +213,7 @@ function handleContextMenu(e: MouseEvent) { @click="handleClick" @contextmenu.prevent="handleContextMenu" > - +
{{ conversation.unreadCount > 99 ? '99+' : conversation.unreadCount }} - + {{ atText }} + + + {{ mutedUnreadText }} + { return '' }) +/** 免打扰会话未读条数文案 */ +const mutedUnreadText = computed(() => { + if (!props.conversation.silent || props.conversation.unreadCount <= 0) { + return '' + } + const count = props.conversation.unreadCount > 99 ? '99+' : props.conversation.unreadCount + return `[${count}条]` +}) + /** 群聊未处理加群申请红字前缀;store 已经按「我管理的群」过滤过,count > 0 即可显示 */ const requestText = computed(() => { if (!isGroup.value) { @@ -204,7 +213,7 @@ function handleContextMenu(e: MouseEvent) { @click="handleClick" @contextmenu.prevent="handleContextMenu" > - +
{{ conversation.unreadCount > 99 ? '99+' : conversation.unreadCount }} - + {{ atText }} + + + {{ mutedUnreadText }} + { return '' }) +/** 免打扰会话未读条数文案 */ +const mutedUnreadText = computed(() => { + if (!props.conversation.silent || props.conversation.unreadCount <= 0) { + return '' + } + const count = props.conversation.unreadCount > 99 ? '99+' : props.conversation.unreadCount + return `[${count}条]` +}) + /** 群聊未处理加群申请红字前缀;store 已经按「我管理的群」过滤过,count > 0 即可显示 */ const requestText = computed(() => { if (!isGroup.value) { @@ -204,7 +213,7 @@ function handleContextMenu(e: MouseEvent) { @click="handleClick" @contextmenu.prevent="handleContextMenu" > - +
{{ conversation.unreadCount > 99 ? '99+' : conversation.unreadCount }} - + {{ atText }} + + + {{ mutedUnreadText }} +