Skip to content

Commit be98ef7

Browse files
committed
fix: 再再再一次尝试修复虚拟滚动带来的布局抖动问题
- 将 DynamicScroller 的 :min-item-size 从 60 提升到 90 - 禁用了浏览器本身的滚动锚点
1 parent 77af5b5 commit be98ef7

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/components/workspace/ChunkView.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<DynamicScroller
4444
ref="scrollerRef"
4545
:items="messages"
46-
:min-item-size="60"
46+
:min-item-size="90"
4747
key-field="messageId"
4848
class="scroller"
4949
>
@@ -410,11 +410,18 @@ function withScrollAnchor(action: () => void) {
410410
display: flex;
411411
flex-direction: column;
412412
overflow: hidden;
413+
overflow-anchor: none;
413414
padding: 0px 0px;
414415
position: relative;
415416
background-color: var(--bg-workspace);
416417
}
417418
419+
.scroller {
420+
flex: 1;
421+
height: 100%;
422+
overflow-anchor: none;
423+
}
424+
418425
.scroller {
419426
flex: 1;
420427
height: 100%;

0 commit comments

Comments
 (0)