@@ -50,25 +50,25 @@ export default {
5050 // 有footer 功能
5151 if ( this . hasTableFooter ) {
5252
53- if ( hasScrollBar ) {
53+ if ( hasScrollBar ) {
5454
5555 if ( this . footerTotalHeight === this . getFooterTotalRowHeight ) {
5656
5757 this . footerTotalHeight += scrollbarWidth ;
5858
59- if ( ! ( this . height && this . height > 0 ) || this . height > totalColumnsHeight ) {
59+ if ( ! ( this . height && this . height > 0 ) || this . height > totalColumnsHeight ) {
6060 this . internalHeight += scrollbarWidth ;
6161 }
6262 }
63- } else if ( ! hasScrollBar ) {
63+ } else if ( ! hasScrollBar ) {
6464
65- if ( this . footerTotalHeight > this . getFooterTotalRowHeight ) {
65+ if ( this . footerTotalHeight > this . getFooterTotalRowHeight ) {
6666
67- this . footerTotalHeight -= scrollbarWidth ;
67+ this . footerTotalHeight -= scrollbarWidth ;
6868
69- if ( ! ( this . height && this . height > 0 ) || this . height > totalColumnsHeight ) {
69+ if ( ! ( this . height && this . height > 0 ) || this . height > totalColumnsHeight ) {
7070
71- this . internalHeight -= scrollbarWidth ;
71+ this . internalHeight -= scrollbarWidth ;
7272 }
7373 }
7474 }
@@ -120,16 +120,14 @@ export default {
120120
121121 if ( self . isHorizontalResize && self . internalWidth && self . internalWidth > 0 && currentWidth > 0 ) {
122122
123- var newTableWidth = this . $el . clientWidth ;
124-
125123 // (窗口宽度缩小 && 当前宽度大于最小宽度) ||(窗口宽度扩大 && 当前宽度小于最大宽度)
126- if ( ( right <= 0 && newTableWidth > minWidth ) || ( right >= 0 && newTableWidth < maxWidth ) ) {
124+ if ( ( right <= 0 && currentWidth > minWidth ) || ( right >= 0 && currentWidth < maxWidth ) ) {
127125
128- newTableWidth = newTableWidth > maxWidth ? maxWidth : newTableWidth ;
129- newTableWidth = newTableWidth < minWidth ? minWidth : newTableWidth ;
126+ currentWidth = currentWidth > maxWidth ? maxWidth : currentWidth ;
127+ currentWidth = currentWidth < minWidth ? minWidth : currentWidth ;
130128
131- self . internalWidth = newTableWidth ;
132- self . changeColumnsWidth ( newTableWidth ) ;
129+ self . internalWidth = currentWidth ;
130+ self . changeColumnsWidth ( currentWidth ) ;
133131 }
134132 }
135133 } ,
@@ -174,6 +172,11 @@ export default {
174172 this . adjustHeight ( false ) ;
175173 }
176174
175+ if ( this . hasFrozenColumn ) {
176+
177+ differ -= 2 ;
178+ }
179+
177180 if ( currentWidth >= initResizeWidths || differ > 0 ) {
178181
179182 var average = differ / this . resizeColumns . length ;
@@ -186,16 +189,14 @@ export default {
186189
187190 return item ;
188191 } )
189- } else { // 最小化有滚动条时
190-
191- this . columns . forEach ( ( col , index ) => {
192+ } else { // 最小化有滚动条时
192193
194+ this . columns . forEach ( ( col , index ) => {
193195
194- if ( col . isResize ) {
196+ if ( col . isResize ) {
195197
196198 this . internalColumns [ index ] . width = col . width ;
197199 }
198-
199200 } )
200201 }
201202 } ,
0 commit comments