From 9fb32f10744b85d01153cc8386908328123694f7 Mon Sep 17 00:00:00 2001 From: ViperEkura <3081035982@qq.com> Date: Thu, 26 Mar 2026 17:24:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B5=81=E5=BC=8F?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=97=B6=E9=A1=B5=E9=9D=A2=E6=8A=96=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/ChatView.vue | 7 ++++++- frontend/src/components/ProcessBlock.vue | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/ChatView.vue b/frontend/src/components/ChatView.vue index c7dc2a7..fed9efa 100644 --- a/frontend/src/components/ChatView.vue +++ b/frontend/src/components/ChatView.vue @@ -189,8 +189,13 @@ function scrollToBottom(smooth = true) { }) } +// 流式时使用 instant 滚动,避免 smooth 动画与内容增长互相打架造成抖动 watch([() => props.messages.length, () => props.streamingContent], () => { - scrollToBottom() + nextTick(() => { + const el = scrollContainer.value + if (!el) return + el.scrollTo({ top: el.scrollHeight, behavior: props.streaming ? 'instant' : 'smooth' }) + }) }) watch(() => props.conversation?.id, () => { diff --git a/frontend/src/components/ProcessBlock.vue b/frontend/src/components/ProcessBlock.vue index a853991..b2d65c8 100644 --- a/frontend/src/components/ProcessBlock.vue +++ b/frontend/src/components/ProcessBlock.vue @@ -411,6 +411,7 @@ watch(() => props.streamingContent?.length, () => { line-height: 1.7; color: var(--text-primary); word-break: break-word; + contain: layout style; } .text-content :deep(.placeholder) {