feat: BubbleList 新增 autoScroll 属性, 暴露 autoScroll 方法, 修改滚动方法等 #105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
需求场景:初始化对话列表较长,所以初始化滚动到底部时不需要有动画效果(deepseek、豆包都是这样的),只希望在添加对话才出现滚动动画!
1.新增 autoScroll 属性,由用户控制是否自动滚动
2.去除容器的样式属性 scroll-behavior,改由容器的scrollTo方法实现滚动,以便通过参数实时控制滚动行为
3.组件暴露 autoScroll 方法,方便在添加对话时实现滚动动画
4.autoScroll方法返回ResizeObserver实例,以便在打字效果结束时取消自动滚动