File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 11/*!
2- * vue-virtual-scroll-list v2.1.8
2+ * vue-virtual-scroll-list v2.1.9
33 * open source under the MIT license
44 * https://github.com/tangbc/vue-virtual-scroll-list#readme
55 */
151151 } // calculate the average size only in the first range
152152
153153
154- if ( this . sizes . size <= this . param . keeps ) {
155- this . firstRangeTotalSize = this . firstRangeTotalSize + size ;
156- this . firstRangeAverageSize = Math . round ( this . firstRangeTotalSize / this . sizes . size ) ;
157- } else {
158- // it's done using
159- delete this . firstRangeTotalSize ;
154+ if ( this . calcType !== CALC_TYPE . FIXED && typeof this . firstRangeTotalSize !== 'undefined' ) {
155+ if ( this . sizes . size < Math . min ( this . param . keeps , this . param . uniqueIds . length ) ) {
156+ this . firstRangeTotalSize = this . firstRangeTotalSize + size ;
157+ this . firstRangeAverageSize = Math . round ( this . firstRangeTotalSize / this . sizes . size ) ;
158+ } else {
159+ // it's done using
160+ delete this . firstRangeTotalSize ;
161+ }
160162 }
161163 } // in some special situation (e.g. length change) we need to update in a row
162164 // try goiong to render next range by a leading buffer according to current direction
363365 } , {
364366 key : "getEstimateSize" ,
365367 value : function getEstimateSize ( ) {
366- return this . firstRangeAverageSize || this . param . estimateSize ;
368+ return this . isFixedType ( ) ? this . fixedSizeValue : this . firstRangeAverageSize || this . param . estimateSize ;
367369 }
368370 } ] ) ;
369371
Original file line number Diff line number Diff line change 11{
22 "name" : " vue-virtual-scroll-list" ,
3- "version" : " 2.1.8 " ,
3+ "version" : " 2.1.9 " ,
44 "description" : " A vue component support big amount data list with high scroll performance." ,
55 "main" : " dist/index.js" ,
66 "files" : [
You can’t perform that action at this time.
0 commit comments