@@ -360,6 +360,8 @@ export default {
360
360
isLeftScrolling : false ,
361
361
// is scrolling right
362
362
isRightScrolling : false ,
363
+ // is scrolling vertically
364
+ isVerticalScrolling : false ,
363
365
// has horizontal scroll bar
364
366
hasXScrollBar : false ,
365
367
// has vertical scroll bar
@@ -588,6 +590,7 @@ export default {
588
590
isVirtualScroll,
589
591
isLeftScrolling,
590
592
isRightScrolling,
593
+ isVerticalScrolling,
591
594
isCellEditing,
592
595
isAutofillStarting,
593
596
enableCellSelection,
@@ -598,6 +601,7 @@ export default {
598
601
[ clsName ( "virtual-scroll" ) ] : isVirtualScroll ,
599
602
[ clsName ( "container-left-scrolling" ) ] : isLeftScrolling ,
600
603
[ clsName ( "container-right-scrolling" ) ] : isRightScrolling ,
604
+ [ clsName ( "container-vertical-scrolling" ) ] : isVerticalScrolling ,
601
605
[ clsName ( "is-cell-editing" ) ] : isCellEditing ,
602
606
[ clsName ( "autofilling" ) ] : isAutofillStarting ,
603
607
// 如果开启单元格选择,则关闭 user-select
@@ -2071,6 +2075,11 @@ export default {
2071
2075
this . isLeftScrolling = scrollLeft > 0 ;
2072
2076
this . isRightScrolling = scrollWidth - clientWidth > scrollLeft ;
2073
2077
}
2078
+
2079
+ if ( this . fixedHeader ) {
2080
+ const { scrollTop } = tableContainerRef ;
2081
+ this . isVerticalScrolling = scrollTop > 0 ;
2082
+ }
2074
2083
} ,
2075
2084
2076
2085
// set scroll bar status
0 commit comments