From 6af3fb44f4eb6485461e403d0fc7b63f246c0761 Mon Sep 17 00:00:00 2001
From: Gsh <15170702455@163.com>
Date: Sat, 31 Jan 2026 21:33:18 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B6=88=E6=81=AFui=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/pages/chat/layouts/chatWithId/index.vue | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue b/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue
index e89ef196..de7ab065 100644
--- a/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue
+++ b/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue
@@ -523,6 +523,13 @@ function copy(item: any) {
.catch(() => ElMessage.error('复制失败'));
}
+/**
+ * 检查消息是否有有效ID(已保存到后端)
+ */
+function hasValidId(item: MessageItem): boolean {
+ return item.id !== undefined && (typeof item.id === 'string' || (typeof item.id === 'number' && item.id > 0));
+}
+
/**
* 进入删除模式(从指定消息开始)
* @param item - 触发删除的消息
@@ -1298,8 +1305,8 @@ onUnmounted(() => {
-
-
+
+
@@ -1407,9 +1414,10 @@ onUnmounted(() => {
&.delete-mode {
.el-bubble {
- // 删除模式下:用户消息加回 flex:auto
+ // 删除模式下:用户消息加回 flex:auto,并移除 max-width 限制
&[class*="end"] .el-bubble-content-wrapper {
flex: auto;
+ max-width: 100%;
}
// 删除模式下的 content 样式 - 全宽背景