From a9ae4bce44ac8691313bbfbf666a7390ad6521ae Mon Sep 17 00:00:00 2001
From: gaoxq <376340421@qq.com>
Date: Fri, 3 Apr 2026 17:26:34 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E4=BC=9A=E8=AF=9D?=
=?UTF-8?q?=E6=94=B9=E7=94=A8el-popover=E5=AE=9E=E7=8E=B0=EF=BC=8C?=
=?UTF-8?q?=E7=82=B9=E5=87=BB=E7=94=9F=E6=95=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web-vue/src/components/ChatDialog.vue | 32 ++++++++++++++++++---------
1 file changed, 22 insertions(+), 10 deletions(-)
diff --git a/web-vue/src/components/ChatDialog.vue b/web-vue/src/components/ChatDialog.vue
index f4e178b..864ce0f 100644
--- a/web-vue/src/components/ChatDialog.vue
+++ b/web-vue/src/components/ChatDialog.vue
@@ -39,18 +39,17 @@
-
- handleChatAction(cmd, chat)">
-
+
+
+
-
-
- 删除会话
-
-
-
-
+
+
+
+ 删除会话
+
+
@@ -589,6 +588,17 @@ const handleChatAction = async (command, chat) => {
}
}
+const deleteRecentChat = async (chat) => {
+ try {
+ await deleteConversation(chat.id)
+ } catch (e) {
+ // 即使 API 失败也删本地
+ }
+ const idx = recentChats.value.findIndex(c => c.id === chat.id)
+ if (idx > -1) recentChats.value.splice(idx, 1)
+ if (currentContact.value?.id === chat.id) currentContact.value = null
+}
+
const scrollToBottom = () => {
nextTick(() => {
if (messagesRef.value) {
@@ -698,6 +708,8 @@ onUnmounted(() => { if (unsubscribeWs) unsubscribeWs() })
.sidebar-empty { padding: 20px; text-align: center; color: #909399; font-size: 12px; }
.chat-action-btn { display: flex; align-items: center; cursor: pointer; padding: 4px; border-radius: 4px; color: #909399; transition: all 0.2s; }
.chat-action-btn:hover { color: #409eff; background: #f0f9ff; }
+.chat-action-list { display: flex; align-items: center; gap: 8px; padding: 8px; cursor: pointer; border-radius: 4px; font-size: 13px; color: #f56c6c; transition: background 0.2s; }
+.chat-action-list:hover { background: #fef0f0; }
.chat-main { flex: 1; display: flex; flex-direction: column; }
.chat-header { display: flex; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid #e4e7ed; }