From fcf1100b5689a99c9bab2f7f6c2ea8ba9d7d8fba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E5=AD=90=E9=BB=98?= <925456043@qq.com>
Date: Wed, 25 Feb 2026 19:47:25 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=81=8A=E5=A4=A9?=
=?UTF-8?q?=E9=A2=84=E8=A7=88=E6=BB=9A=E5=8A=A8=E6=8A=BD=E6=90=90=E4=B8=8E?=
=?UTF-8?q?=E9=94=AE=E7=9B=98=E4=BA=8B=E4=BB=B6=E7=B1=BB=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
任务: 解决问答预览页滚动抽搐并补齐类型检查报错\n\n- 在 chat 组件中改为自定义回到底部按钮,避免内置按钮导致滚动抖动\n- 统一收口流式结束状态,结束时关闭 typing/loading\n- 修复 FaqEditDialog 的 keydown 参数类型,兼容 Event | KeyboardEvent
---
.../app/src/components/chat/chat.vue | 157 +++++++++++++++---
.../ai/documentCollection/FaqEditDialog.vue | 8 +-
2 files changed, 143 insertions(+), 22 deletions(-)
diff --git a/easyflow-ui-admin/app/src/components/chat/chat.vue b/easyflow-ui-admin/app/src/components/chat/chat.vue
index 27039ac..6856a7a 100644
--- a/easyflow-ui-admin/app/src/components/chat/chat.vue
+++ b/easyflow-ui-admin/app/src/components/chat/chat.vue
@@ -1,12 +1,15 @@
@@ -421,11 +500,14 @@ function handlePasteFile(_: any, fileList: FileList) {
@@ -551,6 +633,16 @@ function handlePasteFile(_: any, fileList: FileList) {
+
@@ -638,6 +730,7 @@ function handlePasteFile(_: any, fileList: FileList) {
}
.message-container {
+ position: relative;
padding: 8px;
background-color: var(--bot-chat-message-container);
border-radius: 8px;
@@ -647,6 +740,30 @@ function handlePasteFile(_: any, fileList: FileList) {
border: 1px solid hsl(var(--border));
}
+.chat-back-to-bottom-btn {
+ position: absolute;
+ right: 16px;
+ bottom: 16px;
+ z-index: 2;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ width: 36px;
+ height: 36px;
+ color: var(--el-text-color-regular);
+ cursor: pointer;
+ background: var(--el-bg-color-overlay);
+ border: 1px solid var(--el-border-color-light);
+ border-radius: 999px;
+ box-shadow: 0 6px 10px rgba(0, 0, 0, 0.08);
+ transition: all 0.2s ease;
+}
+
+.chat-back-to-bottom-btn:hover {
+ color: var(--el-color-primary);
+ transform: translateY(-1px);
+}
+
:deep(.el-bubble-content-wrapper .el-bubble-content-filled[data-v-a52d8fe0]) {
background-color: var(--bot-chat-message-item-back);
}
diff --git a/easyflow-ui-admin/app/src/views/ai/documentCollection/FaqEditDialog.vue b/easyflow-ui-admin/app/src/views/ai/documentCollection/FaqEditDialog.vue
index 92efce1..a1de721 100644
--- a/easyflow-ui-admin/app/src/views/ai/documentCollection/FaqEditDialog.vue
+++ b/easyflow-ui-admin/app/src/views/ai/documentCollection/FaqEditDialog.vue
@@ -101,8 +101,12 @@ const focusAnswerEditor = () => {
});
};
-const handleQuestionKeydown = (event: KeyboardEvent) => {
- if (event.key === 'Tab' && !event.shiftKey) {
+const handleQuestionKeydown = (event: Event | KeyboardEvent) => {
+ if (
+ event instanceof KeyboardEvent &&
+ event.key === 'Tab' &&
+ !event.shiftKey
+ ) {
event.preventDefault();
focusAnswerEditor();
}