From edaafdd00053eb699d105585e468d64a37b0a293 Mon Sep 17 00:00:00 2001 From: Tim <135014430+nagisa77@users.noreply.github.com> Date: Mon, 1 Sep 2025 18:18:58 +0800 Subject: [PATCH] fix: scroll channel to bottom on activation --- frontend_nuxt/pages/message-box/[id].vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend_nuxt/pages/message-box/[id].vue b/frontend_nuxt/pages/message-box/[id].vue index a1d69c686..546add168 100644 --- a/frontend_nuxt/pages/message-box/[id].vue +++ b/frontend_nuxt/pages/message-box/[id].vue @@ -371,11 +371,12 @@ watch(isConnected, (newValue) => { }) onActivated(async () => { - // 返回页面时:刷新数据与已读,不做强制滚动,保持用户当前位置 + // 返回页面时:刷新数据与已读,并滚动到底部 if (currentUser.value) { await fetchMessages(0) await markConversationAsRead() await nextTick() + scrollToBottomSmooth() updateNearBottom() if (!isConnected.value) { const token = getToken()