Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/core/src/components/BubbleList/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@ function handleScroll() {
showBackToBottom.value =
props.showBackButton && distanceToBottom > props.backButtonThreshold;

// 处理 lastScrollTop.value 安全距离(scrollHeight 在滚动过程中变小)
const maxScrollTop = scrollHeight - clientHeight;
if (lastScrollTop.value > maxScrollTop) {
lastScrollTop.value = maxScrollTop;
}

// 判断是否距离底部小于阈值 (这里吸附值大一些会体验更好)
const isCloseToBottom = scrollTop + clientHeight >= scrollHeight - 30;
// 判断用户是否向上滚动
Expand Down