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 1
1
/*!
2
- * vue-virtual-scroll-list v2.1.4
2
+ * vue-virtual-scroll-list v2.1.5
3
3
* open source under the MIT license
4
4
* https://github.com/tangbc/vue-virtual-scroll-list#readme
5
5
*/
352
352
} , {
353
353
key : "getEstimateSize" ,
354
354
value : function getEstimateSize ( ) {
355
- return this . firstRangeAverageSize || this . param . size ;
355
+ return this . firstRangeAverageSize || this . param . estimateSize ;
356
356
}
357
357
} ] ) ;
358
358
363
363
* props declaration for default, item and slot component
364
364
*/
365
365
var VirtualProps = {
366
- size : {
367
- type : Number ,
368
- required : true
369
- } ,
370
- keeps : {
371
- type : Number ,
372
- required : true
373
- } ,
374
366
dataKey : {
375
367
type : String ,
376
368
required : true
383
375
type : [ Object , Function ] ,
384
376
required : true
385
377
} ,
378
+ keeps : {
379
+ type : Number ,
380
+ "default" : 30
381
+ } ,
386
382
extraProps : {
387
383
type : Object
388
384
} ,
385
+ estimateSize : {
386
+ type : Number ,
387
+ "default" : 50
388
+ } ,
389
389
rootTag : {
390
390
type : String ,
391
391
"default" : 'div'
445
445
footerClass : {
446
446
type : String ,
447
447
"default" : ''
448
- } ,
449
- disabled : {
450
- type : Boolean ,
451
- "default" : false
452
448
}
453
449
} ;
454
450
var ItemProps = {
691
687
// ----------- public method end -----------
692
688
installVirtual : function installVirtual ( ) {
693
689
this . virtual = new Virtual ( {
694
- size : this . size ,
695
- // also could be a estimate value
696
690
slotHeaderSize : 0 ,
697
691
slotFooterSize : 0 ,
698
692
keeps : this . keeps ,
693
+ estimateSize : this . estimateSize ,
699
694
buffer : Math . round ( this . keeps / 3 ) ,
700
695
// recommend for a third of keeps
701
696
uniqueIds : this . getUniqueIdFromDataSources ( )
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vue-virtual-scroll-list" ,
3
- "version" : " 2.1.4 " ,
3
+ "version" : " 2.1.5 " ,
4
4
"description" : " A vue component support big amount data list with high scroll performance." ,
5
5
"main" : " dist/index.js" ,
6
6
"files" : [
You can’t perform that action at this time.
0 commit comments