Skip to content

Commit

Permalink
Build docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tangbc committed Nov 25, 2020
1 parent 9937db0 commit 2ef187e
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 12 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.293cb696.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.38f9b467.js rel=prefetch><link href=js/fixed-size.af3dc16f.js rel=prefetch><link href=js/horizontal.a6f67d15.js rel=prefetch><link href=js/infinite-loading.82786358.js rel=prefetch><link href=js/keep-state.164d2236.js rel=prefetch><link href=js/page-mode.b72db67b.js rel=prefetch><link href=css/app.12df65ee.css rel=preload as=style><link href=js/app.cabfcb47.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.cabfcb47.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.c08970e6.js rel=prefetch><link href=js/chat-room~dynamic-size~fixed-size~horizontal~infinite-loading~keep-state~page-mode.1968e4ed.js rel=prefetch><link href=js/dynamic-size.3003e8a2.js rel=prefetch><link href=js/fixed-size.1b9763e9.js rel=prefetch><link href=js/horizontal.ad2c5dae.js rel=prefetch><link href=js/infinite-loading.ce8d4372.js rel=prefetch><link href=js/keep-state.08df8235.js rel=prefetch><link href=js/page-mode.7fc3339d.js rel=prefetch><link href=css/app.12df65ee.css rel=preload as=style><link href=js/app.84b61d88.js rel=preload as=script><link href=js/chunk-vendors.20b38b0e.js rel=preload as=script><link href=css/app.12df65ee.css rel=stylesheet></head><body><div id=app></div><script src=js/chunk-vendors.20b38b0e.js></script><script src=js/app.84b61d88.js></script></body></html>
45 changes: 42 additions & 3 deletions docs/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* vue-virtual-scroll-list v2.3.1
* vue-virtual-scroll-list v2.3.2
* open source under the MIT license
* https://github.com/tangbc/vue-virtual-scroll-list#readme
*/
Expand Down Expand Up @@ -34,6 +34,39 @@
return Constructor;
}

function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
}

function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
}

function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
}

function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(n);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}

function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;

for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];

return arr2;
}

function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}

/**
* virtual list core calculating center
*/
Expand Down Expand Up @@ -153,7 +186,9 @@

if (this.calcType !== CALC_TYPE.FIXED && typeof this.firstRangeTotalSize !== 'undefined') {
if (this.sizes.size < Math.min(this.param.keeps, this.param.uniqueIds.length)) {
this.firstRangeTotalSize = this.firstRangeTotalSize + size;
this.firstRangeTotalSize = _toConsumableArray(this.sizes.values()).reduce(function (acc, val) {
return acc + val;
}, 0);
this.firstRangeAverageSize = Math.round(this.firstRangeTotalSize / this.sizes.size);
} else {
// it's done using
Expand Down Expand Up @@ -190,6 +225,10 @@
this.direction = offset < this.offset ? DIRECTION_TYPE.FRONT : DIRECTION_TYPE.BEHIND;
this.offset = offset;

if (!this.param) {
return;
}

if (this.direction === DIRECTION_TYPE.FRONT) {
this.handleFront();
} else if (this.direction === DIRECTION_TYPE.BEHIND) {
Expand All @@ -202,7 +241,7 @@
value: function handleFront() {
var overs = this.getScrollOvers(); // should not change range if start doesn't exceed overs

if (overs > this.range.start || !this.param) {
if (overs > this.range.start) {
return;
} // move up start by a buffer length, and make sure its safety

Expand Down
1 change: 1 addition & 0 deletions docs/js/app.84b61d88.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/js/app.cabfcb47.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/js/chat-room.293cb696.js

This file was deleted.

Loading

0 comments on commit 2ef187e

Please sign in to comment.