From 273168ae5c49b0dd8a6f6e7e1ce9c70b30748346 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 15 Jun 2025 13:40:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B6=88=E6=81=AF=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/components/ShortcutBar.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layouts/components/ShortcutBar.vue b/src/layouts/components/ShortcutBar.vue index 678f112a..54f4ca0b 100644 --- a/src/layouts/components/ShortcutBar.vue +++ b/src/layouts/components/ShortcutBar.vue @@ -123,8 +123,8 @@ function scrollMessageToEnd() { const { scrollTop, scrollHeight, clientHeight } = cardText // 计算距离底部的距离 const distanceFromBottom = scrollHeight - scrollTop - clientHeight - // 如果用户距离底部小于100px,认为用户在底部附近,执行自动滚动 - if (distanceFromBottom <= 100) { + // 如果用户距离底部小于1/3屏幕高度,认为用户在底部附近,执行自动滚动 + if (distanceFromBottom <= clientHeight / 3) { cardText.scrollTop = cardText.scrollHeight } }