File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed
Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import utils from '../../src/utils/utils.js'
66export default {
77 methods : {
88 body1Mousewheel ( e ) {
9+
910 var body2 = this . $el . querySelector ( '.v-table-rightview .v-table-body' ) ;
1011
1112 var e1 = e . originalEvent || window . event || e ;
@@ -40,7 +41,13 @@ export default {
4041
4142 // 列表中滚动条控制
4243 scrollControl ( ) {
43- this . $nextTick ( x => {
44+
45+ if ( this . hasBindScrollEvent ) { return false ; }
46+
47+ this . hasBindScrollEvent = true ;
48+
49+ // 修复左侧固定列绑定滚动事件失效的问题
50+ setTimeout ( x => {
4451
4552 var body1 = this . $el . querySelector ( '.v-table-leftview .v-table-body' ) ;
4653 var body2 = this . $el . querySelector ( '.v-table-rightview .v-table-body' ) ;
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ export default {
126126 if ( self . isVerticalResize && currentHeight > 0 ) {
127127 // (窗口高度缩小 && 当前高度大于最小高度) || (窗口高度扩大 && 当前高度小于最大高度)
128128 bottom -= self . verticalResizeOffset ;
129- if ( ( bottom < 0 && currentHeight > minHeight ) || ( bottom > 0 && currentHeight < maxHeight ) ) {
129+ if ( ( currentHeight > minHeight ) || ( currentHeight < maxHeight ) ) {
130130 var currentHeight = currentHeight + bottom ; // - self.VerticalResizeOffset;
131131 currentHeight = currentHeight > maxHeight ? maxHeight : currentHeight ;
132132 currentHeight = currentHeight < minHeight ? minHeight : currentHeight ;
Original file line number Diff line number Diff line change 806806 if (Array .isArray (this .tableData ) && this .tableData .length > 0 ) {
807807
808808 this .scrollControl ();
809- this .hasBindScrollEvent = true ;
810809 }
811810
812811 this .singelSortInit ();
843842
844843 this .tableEmpty ();
845844
845+ if (this .isTableEmpty ){
846+
847+ this .hasBindScrollEvent = false ;
848+ }
849+
846850 if (Array .isArray (newVal) && newVal .length > 0 ) {
847851
848852 this .initView ();
849853
850- if (! this .hasBindScrollEvent ) {
851- this .scrollControl ();
852- }
854+ this .scrollControl ();
853855 }
854856
855857 this .resize ();
You can’t perform that action at this time.
0 commit comments