Skip to content

Commit b0263d8

Browse files
committed
Build docs
1 parent ec7f5e9 commit b0263d8

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><title>vue-virtual-scroll-list</title><link rel=icon href=favicon.png><link rel=stylesheet href=milligram.css><link rel=stylesheet href=highlight/theme.css><script src=highlight/pack.js></script><script async defer src=https://buttons.github.io/buttons.js></script><script>hljs.initHighlightingOnLoad()</script><link href=css/chat-room.9f37805a.css rel=prefetch><link href=css/dynamic-size.9013d8ce.css rel=prefetch><link href=css/fixed-size.840ec49f.css rel=prefetch><link href=css/horizontal.50e26ffa.css rel=prefetch><link href=css/infinite-loading.4b238c18.css rel=prefetch><link href=css/keep-state.2736386a.css rel=prefetch><link href=css/page-mode.bb1117ff.css rel=prefetch><link href=js/chat-room.37e520ca.js rel=prefetch><link href=js/chat-room~dynamic-size~fixed-size~horizontal~infinite-loading~keep-state~page-mode.fea2e070.js rel=prefetch><link href=js/dynamic-size.debe7fb6.js rel=prefetch><link href=js/fixed-size.fab2dd0f.js rel=prefetch><link href=js/horizontal.6faaaf18.js rel=prefetch><link href=js/infinite-loading.afbe430b.js rel=prefetch><link href=js/keep-state.d5fcfbd1.js rel=prefetch><link href=js/page-mode.ff8e6c9b.js rel=prefetch><link href=css/app.12df65ee.css rel=preload as=style><link href=js/app.c6be3d65.js rel=preload as=script><link href=js/chunk-vendors.cb54c5d1.js rel=preload as=script><link href=css/app.12df65ee.css rel=stylesheet></head><body><div id=app></div><script src=js/chunk-vendors.cb54c5d1.js></script><script src=js/app.c6be3d65.js></script></body></html>
1+
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><title>vue-virtual-scroll-list</title><link rel=icon href=favicon.png><link rel=stylesheet href=milligram.css><link rel=stylesheet href=highlight/theme.css><script src=highlight/pack.js></script><script async defer src=https://buttons.github.io/buttons.js></script><script>hljs.initHighlightingOnLoad()</script><link href=css/chat-room.9f37805a.css rel=prefetch><link href=css/dynamic-size.9013d8ce.css rel=prefetch><link href=css/fixed-size.840ec49f.css rel=prefetch><link href=css/horizontal.50e26ffa.css rel=prefetch><link href=css/infinite-loading.4b238c18.css rel=prefetch><link href=css/keep-state.2736386a.css rel=prefetch><link href=css/page-mode.bb1117ff.css rel=prefetch><link href=js/chat-room.37e520ca.js rel=prefetch><link href=js/chat-room~dynamic-size~fixed-size~horizontal~infinite-loading~keep-state~page-mode.fea2e070.js rel=prefetch><link href=js/dynamic-size.debe7fb6.js rel=prefetch><link href=js/fixed-size.fab2dd0f.js rel=prefetch><link href=js/horizontal.6faaaf18.js rel=prefetch><link href=js/infinite-loading.afbe430b.js rel=prefetch><link href=js/keep-state.d5fcfbd1.js rel=prefetch><link href=js/page-mode.ff8e6c9b.js rel=prefetch><link href=css/app.12df65ee.css rel=preload as=style><link href=js/app.d683905d.js rel=preload as=script><link href=js/chunk-vendors.cb54c5d1.js rel=preload as=script><link href=css/app.12df65ee.css rel=stylesheet></head><body><div id=app></div><script src=js/chunk-vendors.cb54c5d1.js></script><script src=js/app.d683905d.js></script></body></html>

docs/index.js

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-virtual-scroll-list v2.2.0
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
*/
@@ -263,7 +263,6 @@
263263
}, {
264264
key: "getIndexOffset",
265265
value: function getIndexOffset(givenIndex) {
266-
// we know this.
267266
if (!givenIndex) {
268267
return 0;
269268
}
@@ -274,7 +273,7 @@
274273
for (var index = 0; index < givenIndex; index++) {
275274
// this.__getIndexOffsetCalls++
276275
indexSize = this.sizes.get(this.param.uniqueIds[index]);
277-
offset = offset + (indexSize || this.getEstimateSize());
276+
offset = offset + (typeof indexSize === 'number' ? indexSize : this.getEstimateSize());
278277
} // remember last calculate index
279278

280279

@@ -474,6 +473,9 @@
474473
},
475474
footerStyle: {
476475
type: Object
476+
},
477+
itemScopedSlots: {
478+
type: Object
477479
}
478480
};
479481
var ItemProps = {
@@ -496,10 +498,13 @@
496498
type: [Object, Function]
497499
},
498500
uniqueKey: {
499-
type: String
501+
type: [String, Number]
500502
},
501503
extraProps: {
502504
type: Object
505+
},
506+
scopedSlots: {
507+
type: Object
503508
}
504509
};
505510
var SlotProps = {
@@ -564,15 +569,18 @@
564569
component = this.component,
565570
_this$extraProps = this.extraProps,
566571
extraProps = _this$extraProps === void 0 ? {} : _this$extraProps,
567-
index = this.index;
572+
index = this.index,
573+
_this$scopedSlots = this.scopedSlots,
574+
scopedSlots = _this$scopedSlots === void 0 ? {} : _this$scopedSlots;
568575
extraProps.source = this.source;
569576
extraProps.index = index;
570577
return h(tag, {
571578
attrs: {
572579
role: 'item'
573580
}
574581
}, [h(component, {
575-
props: extraProps
582+
props: extraProps,
583+
scopedSlots: scopedSlots
576584
})]);
577585
}
578586
}); // wrapping for slot
@@ -838,14 +846,16 @@
838846
itemStyle = this.itemStyle,
839847
isHorizontal = this.isHorizontal,
840848
extraProps = this.extraProps,
841-
dataComponent = this.dataComponent;
849+
dataComponent = this.dataComponent,
850+
itemScopedSlots = this.itemScopedSlots;
842851

843852
for (var index = start; index <= end; index++) {
844853
var dataSource = dataSources[index];
845854

846855
if (dataSource) {
847856
if (Object.prototype.hasOwnProperty.call(dataSource, dataKey)) {
848857
slots.push(h(Item, {
858+
key: dataSource[dataKey],
849859
props: {
850860
index: index,
851861
tag: itemTag,
@@ -854,7 +864,8 @@
854864
uniqueKey: dataSource[dataKey],
855865
source: dataSource,
856866
extraProps: extraProps,
857-
component: dataComponent
867+
component: dataComponent,
868+
scopedSlots: itemScopedSlots
858869
},
859870
style: itemStyle,
860871
"class": "".concat(itemClass).concat(this.itemClassAdd ? ' ' + this.itemClassAdd(index) : '')

0 commit comments

Comments
 (0)