From d34fbe963a3b3b6025aebb75fe99f8d00234aad6 Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Fri, 2 Jan 2026 12:39:23 +0800 Subject: [PATCH] fix: unify collapse animation and scroll lock reset --- static/src/app.ts | 5 +++- static/src/components/chat/ChatArea.vue | 26 ++++++++++++++++--- .../components/chat/actions/ToolAction.vue | 7 ++++- static/src/composables/useScrollControl.ts | 17 ++++++++++++ .../styles/components/chat/_chat-area.scss | 11 ++++---- 5 files changed, 56 insertions(+), 10 deletions(-) diff --git a/static/src/app.ts b/static/src/app.ts index a2c01fb..432b720 100644 --- a/static/src/app.ts +++ b/static/src/app.ts @@ -57,6 +57,7 @@ import { scrollToBottom as scrollToBottomHelper, conditionalScrollToBottom as conditionalScrollToBottomHelper, toggleScrollLock as toggleScrollLockHelper, + normalizeScrollLock, scrollThinkingToBottom as scrollThinkingToBottomHelper } from './composables/useScrollControl'; import { @@ -294,7 +295,7 @@ const appOptions = { }); }, - async mounted() { + async mounted() { debugLog('Vue应用已挂载'); if (window.ensureCsrfToken) { window.ensureCsrfToken().catch((err) => { @@ -308,6 +309,8 @@ const appOptions = { await socketPromise; this.$nextTick(() => { this.ensureScrollListener(); + // 刷新后若无输出,自动解锁滚动锁定 + normalizeScrollLock(this); }); setupShowImageObserver(); diff --git a/static/src/components/chat/ChatArea.vue b/static/src/components/chat/ChatArea.vue index 43b60a6..82fb6c4 100644 --- a/static/src/components/chat/ChatArea.vue +++ b/static/src/components/chat/ChatArea.vue @@ -79,7 +79,10 @@ {{ group.action.streaming ? '正在思考...' : '思考过程' }} -