File tree Expand file tree Collapse file tree 2 files changed +12
-17
lines changed
Expand file tree Collapse file tree 2 files changed +12
-17
lines changed Original file line number Diff line number Diff line change 11/*!
2- * vue-virtual-scroll-list v2.1.4
2+ * vue-virtual-scroll-list v2.1.5
33 * open source under the MIT license
44 * https://github.com/tangbc/vue-virtual-scroll-list#readme
55 */
352352 } , {
353353 key : "getEstimateSize" ,
354354 value : function getEstimateSize ( ) {
355- return this . firstRangeAverageSize || this . param . size ;
355+ return this . firstRangeAverageSize || this . param . estimateSize ;
356356 }
357357 } ] ) ;
358358
363363 * props declaration for default, item and slot component
364364 */
365365 var VirtualProps = {
366- size : {
367- type : Number ,
368- required : true
369- } ,
370- keeps : {
371- type : Number ,
372- required : true
373- } ,
374366 dataKey : {
375367 type : String ,
376368 required : true
383375 type : [ Object , Function ] ,
384376 required : true
385377 } ,
378+ keeps : {
379+ type : Number ,
380+ "default" : 30
381+ } ,
386382 extraProps : {
387383 type : Object
388384 } ,
385+ estimateSize : {
386+ type : Number ,
387+ "default" : 50
388+ } ,
389389 rootTag : {
390390 type : String ,
391391 "default" : 'div'
445445 footerClass : {
446446 type : String ,
447447 "default" : ''
448- } ,
449- disabled : {
450- type : Boolean ,
451- "default" : false
452448 }
453449 } ;
454450 var ItemProps = {
691687 // ----------- public method end -----------
692688 installVirtual : function installVirtual ( ) {
693689 this . virtual = new Virtual ( {
694- size : this . size ,
695- // also could be a estimate value
696690 slotHeaderSize : 0 ,
697691 slotFooterSize : 0 ,
698692 keeps : this . keeps ,
693+ estimateSize : this . estimateSize ,
699694 buffer : Math . round ( this . keeps / 3 ) ,
700695 // recommend for a third of keeps
701696 uniqueIds : this . getUniqueIdFromDataSources ( )
Original file line number Diff line number Diff line change 11{
22 "name" : " vue-virtual-scroll-list" ,
3- "version" : " 2.1.4 " ,
3+ "version" : " 2.1.5 " ,
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