Skip to content

Commit 05d700a

Browse files
author
何嘉悦
committed
fix: 修复BubbleList自动滚动时候调用回到顶部方法的bug
1 parent 91e7433 commit 05d700a

File tree

1 file changed

+3
-1
lines changed
  • packages/components/src/components/BubbleList

1 file changed

+3
-1
lines changed

packages/components/src/components/BubbleList/index.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const emits = defineEmits(["onComplete"]);
5050
5151
const props = withDefaults(defineProps<BubbleListProps<T>>(), {
5252
maxHeight: "500px",
53-
})
53+
});
5454
5555
/* 在底部时候自动滚动 开始 */
5656
// 滚动容器的引用
@@ -82,6 +82,8 @@ watch(
8282
8383
// 父组件的触发方法,直接让滚动容器滚动到顶部
8484
function scrollToTop() {
85+
// 处理在滚动时候,无法回到顶部的问题
86+
wasOver.value = true;
8587
nextTick(() => {
8688
// 自动滚动到最顶部
8789
scrollContainer.value!.scrollTop = 0;

0 commit comments

Comments
 (0)