Skip to content

Commit

Permalink
Build docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tangbc committed May 28, 2020
1 parent ec7f5e9 commit b0263d8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -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>
<!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>
27 changes: 19 additions & 8 deletions docs/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* vue-virtual-scroll-list v2.2.0
* vue-virtual-scroll-list v2.2.4
* open source under the MIT license
* https://github.com/tangbc/vue-virtual-scroll-list#readme
*/
Expand Down Expand Up @@ -263,7 +263,6 @@
}, {
key: "getIndexOffset",
value: function getIndexOffset(givenIndex) {
// we know this.
if (!givenIndex) {
return 0;
}
Expand All @@ -274,7 +273,7 @@
for (var index = 0; index < givenIndex; index++) {
// this.__getIndexOffsetCalls++
indexSize = this.sizes.get(this.param.uniqueIds[index]);
offset = offset + (indexSize || this.getEstimateSize());
offset = offset + (typeof indexSize === 'number' ? indexSize : this.getEstimateSize());
} // remember last calculate index


Expand Down Expand Up @@ -474,6 +473,9 @@
},
footerStyle: {
type: Object
},
itemScopedSlots: {
type: Object
}
};
var ItemProps = {
Expand All @@ -496,10 +498,13 @@
type: [Object, Function]
},
uniqueKey: {
type: String
type: [String, Number]
},
extraProps: {
type: Object
},
scopedSlots: {
type: Object
}
};
var SlotProps = {
Expand Down Expand Up @@ -564,15 +569,18 @@
component = this.component,
_this$extraProps = this.extraProps,
extraProps = _this$extraProps === void 0 ? {} : _this$extraProps,
index = this.index;
index = this.index,
_this$scopedSlots = this.scopedSlots,
scopedSlots = _this$scopedSlots === void 0 ? {} : _this$scopedSlots;
extraProps.source = this.source;
extraProps.index = index;
return h(tag, {
attrs: {
role: 'item'
}
}, [h(component, {
props: extraProps
props: extraProps,
scopedSlots: scopedSlots
})]);
}
}); // wrapping for slot
Expand Down Expand Up @@ -838,14 +846,16 @@
itemStyle = this.itemStyle,
isHorizontal = this.isHorizontal,
extraProps = this.extraProps,
dataComponent = this.dataComponent;
dataComponent = this.dataComponent,
itemScopedSlots = this.itemScopedSlots;

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

if (dataSource) {
if (Object.prototype.hasOwnProperty.call(dataSource, dataKey)) {
slots.push(h(Item, {
key: dataSource[dataKey],
props: {
index: index,
tag: itemTag,
Expand All @@ -854,7 +864,8 @@
uniqueKey: dataSource[dataKey],
source: dataSource,
extraProps: extraProps,
component: dataComponent
component: dataComponent,
scopedSlots: itemScopedSlots
},
style: itemStyle,
"class": "".concat(itemClass).concat(this.itemClassAdd ? ' ' + this.itemClassAdd(index) : '')
Expand Down
Loading

0 comments on commit b0263d8

Please sign in to comment.