|
1 | 1 | /*! |
2 | | - * vue-virtual-scroll-list v2.2.3 |
| 2 | + * vue-virtual-scroll-list v2.2.4 |
3 | 3 | * open source under the MIT license |
4 | 4 | * https://github.com/tangbc/vue-virtual-scroll-list#readme |
5 | 5 | */ |
|
473 | 473 | }, |
474 | 474 | footerStyle: { |
475 | 475 | type: Object |
| 476 | + }, |
| 477 | + itemScopedSlots: { |
| 478 | + type: Object |
476 | 479 | } |
477 | 480 | }; |
478 | 481 | var ItemProps = { |
|
499 | 502 | }, |
500 | 503 | extraProps: { |
501 | 504 | type: Object |
| 505 | + }, |
| 506 | + scopedSlots: { |
| 507 | + type: Object |
502 | 508 | } |
503 | 509 | }; |
504 | 510 | var SlotProps = { |
|
563 | 569 | component = this.component, |
564 | 570 | _this$extraProps = this.extraProps, |
565 | 571 | 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; |
567 | 575 | extraProps.source = this.source; |
568 | 576 | extraProps.index = index; |
569 | 577 | return h(tag, { |
570 | 578 | attrs: { |
571 | 579 | role: 'item' |
572 | 580 | } |
573 | 581 | }, [h(component, { |
574 | | - props: extraProps |
| 582 | + props: extraProps, |
| 583 | + scopedSlots: scopedSlots |
575 | 584 | })]); |
576 | 585 | } |
577 | 586 | }); // wrapping for slot |
|
837 | 846 | itemStyle = this.itemStyle, |
838 | 847 | isHorizontal = this.isHorizontal, |
839 | 848 | extraProps = this.extraProps, |
840 | | - dataComponent = this.dataComponent; |
| 849 | + dataComponent = this.dataComponent, |
| 850 | + itemScopedSlots = this.itemScopedSlots; |
841 | 851 |
|
842 | 852 | for (var index = start; index <= end; index++) { |
843 | 853 | var dataSource = dataSources[index]; |
844 | 854 |
|
845 | 855 | if (dataSource) { |
846 | 856 | if (Object.prototype.hasOwnProperty.call(dataSource, dataKey)) { |
847 | 857 | slots.push(h(Item, { |
| 858 | + key: dataSource[dataKey], |
848 | 859 | props: { |
849 | 860 | index: index, |
850 | 861 | tag: itemTag, |
|
853 | 864 | uniqueKey: dataSource[dataKey], |
854 | 865 | source: dataSource, |
855 | 866 | extraProps: extraProps, |
856 | | - component: dataComponent |
| 867 | + component: dataComponent, |
| 868 | + scopedSlots: itemScopedSlots |
857 | 869 | }, |
858 | 870 | style: itemStyle, |
859 | 871 | "class": "".concat(itemClass).concat(this.itemClassAdd ? ' ' + this.itemClassAdd(index) : '') |
|
0 commit comments