@@ -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
@@ -2050,10 +2054,10 @@ export default {
2050
2054
2051
2055
// set scrolling
2052
2056
setScrolling ( tableContainerRef ) {
2053
- if ( this . hasFixedColumn ) {
2054
- const { scrollWidth, clientWidth, scrollLeft } =
2055
- tableContainerRef ;
2057
+ const { scrollWidth, clientWidth, scrollLeft, scrollTop } =
2058
+ tableContainerRef ;
2056
2059
2060
+ if ( this . hasFixedColumn ) {
2057
2061
const { previewTableContainerScrollLeft : previewScrollLeft } =
2058
2062
this ;
2059
2063
@@ -2071,6 +2075,10 @@ export default {
2071
2075
this . isLeftScrolling = scrollLeft > 0 ;
2072
2076
this . isRightScrolling = scrollWidth - clientWidth > scrollLeft ;
2073
2077
}
2078
+
2079
+ if ( this . fixedHeader ) {
2080
+ this . isVerticalScrolling = scrollTop > 0 ;
2081
+ }
2074
2082
} ,
2075
2083
2076
2084
// set scroll bar status
0 commit comments