Skip to content

Commit ec7f5e9

Browse files
committed
Release v2.2.4
1 parent 2a90506 commit ec7f5e9

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

dist/index.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-virtual-scroll-list v2.2.3
2+
* vue-virtual-scroll-list v2.2.4
33
* open source under the MIT license
44
* https://github.com/tangbc/vue-virtual-scroll-list#readme
55
*/
@@ -473,6 +473,9 @@
473473
},
474474
footerStyle: {
475475
type: Object
476+
},
477+
itemScopedSlots: {
478+
type: Object
476479
}
477480
};
478481
var ItemProps = {
@@ -499,6 +502,9 @@
499502
},
500503
extraProps: {
501504
type: Object
505+
},
506+
scopedSlots: {
507+
type: Object
502508
}
503509
};
504510
var SlotProps = {
@@ -563,15 +569,18 @@
563569
component = this.component,
564570
_this$extraProps = this.extraProps,
565571
extraProps = _this$extraProps === void 0 ? {} : _this$extraProps,
566-
index = this.index;
572+
index = this.index,
573+
_this$scopedSlots = this.scopedSlots,
574+
scopedSlots = _this$scopedSlots === void 0 ? {} : _this$scopedSlots;
567575
extraProps.source = this.source;
568576
extraProps.index = index;
569577
return h(tag, {
570578
attrs: {
571579
role: 'item'
572580
}
573581
}, [h(component, {
574-
props: extraProps
582+
props: extraProps,
583+
scopedSlots: scopedSlots
575584
})]);
576585
}
577586
}); // wrapping for slot
@@ -837,14 +846,16 @@
837846
itemStyle = this.itemStyle,
838847
isHorizontal = this.isHorizontal,
839848
extraProps = this.extraProps,
840-
dataComponent = this.dataComponent;
849+
dataComponent = this.dataComponent,
850+
itemScopedSlots = this.itemScopedSlots;
841851

842852
for (var index = start; index <= end; index++) {
843853
var dataSource = dataSources[index];
844854

845855
if (dataSource) {
846856
if (Object.prototype.hasOwnProperty.call(dataSource, dataKey)) {
847857
slots.push(h(Item, {
858+
key: dataSource[dataKey],
848859
props: {
849860
index: index,
850861
tag: itemTag,
@@ -853,7 +864,8 @@
853864
uniqueKey: dataSource[dataKey],
854865
source: dataSource,
855866
extraProps: extraProps,
856-
component: dataComponent
867+
component: dataComponent,
868+
scopedSlots: itemScopedSlots
857869
},
858870
style: itemStyle,
859871
"class": "".concat(itemClass).concat(this.itemClassAdd ? ' ' + this.itemClassAdd(index) : '')

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.2.3",
3+
"version": "2.2.4",
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)