Skip to content

Commit d0cfdf6

Browse files
committed
Build v2.1.5
1 parent f76565d commit d0cfdf6

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

dist/index.js

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
*/
@@ -352,7 +352,7 @@
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

@@ -363,14 +363,6 @@
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
@@ -383,9 +375,17 @@
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'
@@ -445,10 +445,6 @@
445445
footerClass: {
446446
type: String,
447447
"default": ''
448-
},
449-
disabled: {
450-
type: Boolean,
451-
"default": false
452448
}
453449
};
454450
var ItemProps = {
@@ -691,11 +687,10 @@
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()

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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": [

0 commit comments

Comments
 (0)