UNPKG

lite-virtual-list

Version:

a vue components support waterfall flow and have large data lists with high scrolling performance

2 lines 21.5 kB
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["lite-virtual-list"]=e():t["lite-virtual-list"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s="fb15")}({"00fd":function(t,e,r){var i=r("9e69"),n=Object.prototype,a=n.hasOwnProperty,o=n.toString,s=i?i.toStringTag:void 0;function l(t){var e=a.call(t,s),r=t[s];try{t[s]=void 0;var i=!0}catch(l){}var n=o.call(t);return i&&(e?t[s]=r:delete t[s]),n}t.exports=l},"0f32":function(t,e,r){var i=r("b047"),n=r("1a8c"),a="Expected a function";function o(t,e,r){var o=!0,s=!0;if("function"!=typeof t)throw new TypeError(a);return n(r)&&(o="leading"in r?!!r.leading:o,s="trailing"in r?!!r.trailing:s),i(t,e,{leading:o,maxWait:e,trailing:s})}t.exports=o},1310:function(t,e){function r(t){return null!=t&&"object"==typeof t}t.exports=r},"1a8c":function(t,e){function r(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=r},"24fb":function(t,e,r){"use strict";function i(t,e){var r=t[1]||"",i=t[3];if(!i)return r;if(e&&"function"===typeof btoa){var a=n(i),o=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[r].concat(o).concat([a]).join("\n")}return[r].join("\n")}function n(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(e);return"/*# ".concat(r," */")}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=i(e,t);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,i){"string"===typeof t&&(t=[[null,t,""]]);var n={};if(i)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(n[o]=!0)}for(var s=0;s<t.length;s++){var l=[].concat(t[s]);i&&n[l[0]]||(r&&(l[2]?l[2]="".concat(r," and ").concat(l[2]):l[2]=r),e.push(l))}},e}},"29f3":function(t,e){var r=Object.prototype,i=r.toString;function n(t){return i.call(t)}t.exports=n},"2b3e":function(t,e,r){var i=r("585a"),n="object"==typeof self&&self&&self.Object===Object&&self,a=i||n||Function("return this")();t.exports=a},3729:function(t,e,r){var i=r("9e69"),n=r("00fd"),a=r("29f3"),o="[object Null]",s="[object Undefined]",l=i?i.toStringTag:void 0;function f(t){return null==t?void 0===t?s:o:l&&l in Object(t)?n(t):a(t)}t.exports=f},"408c":function(t,e,r){var i=r("2b3e"),n=function(){return i.Date.now()};t.exports=n},4636:function(t,e,r){"use strict";r("f6d5")},"499e":function(t,e,r){"use strict";function i(t,e){for(var r=[],i={},n=0;n<e.length;n++){var a=e[n],o=a[0],s=a[1],l=a[2],f=a[3],u={id:t+":"+n,css:s,media:l,sourceMap:f};i[o]?i[o].parts.push(u):r.push(i[o]={id:o,parts:[u]})}return r}r.r(e),r.d(e,"default",(function(){return p}));var n="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!n)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var a={},o=n&&(document.head||document.getElementsByTagName("head")[0]),s=null,l=0,f=!1,u=function(){},c=null,h="data-vue-ssr-id",d="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(t,e,r,n){f=r,c=n||{};var o=i(t,e);return g(o),function(e){for(var r=[],n=0;n<o.length;n++){var s=o[n],l=a[s.id];l.refs--,r.push(l)}e?(o=i(t,e),g(o)):o=[];for(n=0;n<r.length;n++){l=r[n];if(0===l.refs){for(var f=0;f<l.parts.length;f++)l.parts[f]();delete a[l.id]}}}}function g(t){for(var e=0;e<t.length;e++){var r=t[e],i=a[r.id];if(i){i.refs++;for(var n=0;n<i.parts.length;n++)i.parts[n](r.parts[n]);for(;n<r.parts.length;n++)i.parts.push(m(r.parts[n]));i.parts.length>r.parts.length&&(i.parts.length=r.parts.length)}else{var o=[];for(n=0;n<r.parts.length;n++)o.push(m(r.parts[n]));a[r.id]={id:r.id,refs:1,parts:o}}}}function v(){var t=document.createElement("style");return t.type="text/css",o.appendChild(t),t}function m(t){var e,r,i=document.querySelector("style["+h+'~="'+t.id+'"]');if(i){if(f)return u;i.parentNode.removeChild(i)}if(d){var n=l++;i=s||(s=v()),e=y.bind(null,i,n,!1),r=y.bind(null,i,n,!0)}else i=v(),e=w.bind(null,i),r=function(){i.parentNode.removeChild(i)};return e(t),function(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap)return;e(t=i)}else r()}}var b=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}();function y(t,e,r,i){var n=r?"":i.css;if(t.styleSheet)t.styleSheet.cssText=b(e,n);else{var a=document.createTextNode(n),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(a,o[e]):t.appendChild(a)}}function w(t,e){var r=e.css,i=e.media,n=e.sourceMap;if(i&&t.setAttribute("media",i),c.ssrId&&t.setAttribute(h,e.id),n&&(r+="\n/*# sourceURL="+n.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}},"585a":function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,r("c8ba"))},8875:function(t,e,r){var i,n,a;(function(r,o){n=[],i=o,a="function"===typeof i?i.apply(e,n):i,void 0===a||(t.exports=a)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(d){var r,i,n,a=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,o=/@([^@]*):(\d+):(\d+)\s*$/gi,s=a.exec(d.stack)||o.exec(d.stack),l=s&&s[1]||!1,f=s&&s[2]||!1,u=document.location.href.replace(document.location.hash,""),c=document.getElementsByTagName("script");l===u&&(r=document.documentElement.outerHTML,i=new RegExp("(?:[^\\n]+?\\n){0,"+(f-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),n=r.replace(i,"$1").trim());for(var h=0;h<c.length;h++){if("interactive"===c[h].readyState)return c[h];if(c[h].src===l)return c[h];if(l===u&&c[h].innerHTML&&c[h].innerHTML.trim()===n)return c[h]}return null}}return t}))},"88b1":function(t,e,r){var i=r("24fb");e=i(!1),e.push([t.i,".virtual-list{overflow-y:auto;position:relative;-webkit-overflow-scrolling:touch}.virtual-list *{box-sizing:border-box}.scroll-list{position:absolute;top:0;left:0;width:100%}.waterfall-list{display:flex;justify-content:space-between}.left-wrap,.right-wrap{width:50%}.left-item,.right-item{overflow:hidden}",""]),t.exports=e},"9e69":function(t,e,r){var i=r("2b3e"),n=i.Symbol;t.exports=n},b047:function(t,e,r){var i=r("1a8c"),n=r("408c"),a=r("b4b0"),o="Expected a function",s=Math.max,l=Math.min;function f(t,e,r){var f,u,c,h,d,p,g=0,v=!1,m=!1,b=!0;if("function"!=typeof t)throw new TypeError(o);function y(e){var r=f,i=u;return f=u=void 0,g=e,h=t.apply(i,r),h}function w(t){return g=t,d=setTimeout(D,e),v?y(t):h}function S(t){var r=t-p,i=t-g,n=e-r;return m?l(n,c-i):n}function x(t){var r=t-p,i=t-g;return void 0===p||r>=e||r<0||m&&i>=c}function D(){var t=n();if(x(t))return I(t);d=setTimeout(D,S(t))}function I(t){return d=void 0,b&&f?y(t):(f=u=void 0,h)}function E(){void 0!==d&&clearTimeout(d),g=0,f=p=u=d=void 0}function O(){return void 0===d?h:I(n())}function j(){var t=n(),r=x(t);if(f=arguments,u=this,p=t,r){if(void 0===d)return w(p);if(m)return clearTimeout(d),d=setTimeout(D,e),y(p)}return void 0===d&&(d=setTimeout(D,e)),h}return e=a(e)||0,i(r)&&(v=!!r.leading,m="maxWait"in r,c=m?s(a(r.maxWait)||0,e):c,b="trailing"in r?!!r.trailing:b),j.cancel=E,j.flush=O,j}t.exports=f},b4b0:function(t,e,r){var i=r("1a8c"),n=r("ffd6"),a=NaN,o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,f=/^0o[0-7]+$/i,u=parseInt;function c(t){if("number"==typeof t)return t;if(n(t))return a;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var r=l.test(t);return r||f.test(t)?u(t.slice(2),r?2:8):s.test(t)?a:+t}t.exports=c},c8ba:function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(i){"object"===typeof window&&(r=window)}t.exports=r},f6d5:function(t,e,r){var i=r("88b1");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=r("499e").default;n("cfb811d6",i,!0,{sourceMap:!1,shadowMode:!1})},fb15:function(t,e,r){"use strict";if(r.r(e),"undefined"!==typeof window){var i=window.document.currentScript,n=r("8875");i=n(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:n});var a=i&&i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(r.p=a[1])}var o=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{ref:"virtualList",staticClass:"virtual-list",on:{"&scroll":function(e){return t.getScrollFn(e)}}},[r("div",{ref:"scrollBar",staticClass:"scroll-bar"}),r("div",{ref:"scrollList",staticClass:"scroll-list",class:{"waterfall-list":t.isWaterfall},style:t.transform},[t.isWaterfall?[r("div",{staticClass:"left-wrap",style:{transform:"translate3d(0,"+t.leftOffset+"px,0)"}},t._l(t.renderLeft,(function(e){return r("div",{key:e.id,staticClass:"left-item",style:t.setStyle(e),attrs:{vid:e.id}},[t._t("default",null,{item:e})],2)})),0),r("div",{staticClass:"right-wrap",style:{transform:"translate3d(0,"+t.rightOffset+"px,0)"}},t._l(t.renderRight,(function(e){return r("div",{key:e.id,staticClass:"right-item",style:t.setStyle(e),attrs:{vid:e.id}},[t._t("default",null,{item:e})],2)})),0)]:t._l(t.renderData,(function(e){return r("div",{key:e.id,ref:"nodes",refInFor:!0,attrs:{vIndex:e.index}},[t._t("default",null,{item:e})],2)}))],2),t._t("bottom")],2)},s=[],l=r("0f32"),f=r.n(l);var u=function(t,e){var r=0,i=e.length-1,n=null;while(r<=i){var a=Math.floor((r+i)/2),o=e[a].bottom;if(t==o)return a+1;o<t?r=a+1:o>t&&((null==n||n>a)&&(n=a),i=a-1)}return n},c={WATERFALL:"waterfall",FIXED:"fixed",VARIABLE:"variable"};function h(t){return v(t)||g(t)||p(t)||d()}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(t,e){if(t){if("string"===typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(t,e):void 0}}function g(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function v(t){if(Array.isArray(t))return m(t)}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function b(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?b(Object(r),!0).forEach((function(e){w(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function w(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var S={name:"lite-virtual-list",props:{data:{type:Array,required:!0,default:function(){return[]}},type:{type:String,required:!0},remain:{type:[Number,String],required:!0},size:{type:[Number,String],required:!1},screen:{type:Array,required:!1,default:function(){return[1,1]}},distance:{type:[Number,String],required:!1,default:50},interval:{type:Number,required:!1,default:0},virtualHieght:{type:String,required:!1,default:"100%"},unit:{type:String,required:!1,default:"px"},marginBottom:{type:[Number,String],required:!1,default:0},deleteId:{type:[Number,String],required:!1}},data:function(){return{start:0,end:0,offset:0,leftOffset:0,rightOffset:0,leftStart:0,rightStart:0,leftEnd:0,rightEnd:0,leftHeight:0,rightHieght:0,scrollTop:0}},computed:{isWaterfall:function(){return this.type===c.WATERFALL},transform:function(){return this.isWaterfall?null:{transform:"translate3d(0,".concat(this.offset,"px,0)")}},renderLeft:function(){return this.waterfallInfo?this.waterfallInfo.left.slice(this.leftStart-this.leftPrevCount,this.leftEnd+this.leftNextCount):0},renderRight:function(){return this.waterfallInfo?this.waterfallInfo.right.slice(this.rightStart-this.rightPrevCount,this.rightEnd+this.rightNextCount):0},renderData:function(){return this.formatData.slice(this.start-this.prevCount,this.end+this.nextCount)},formatData:function(){return this.data.map((function(t,e){return y(y({},t),{},{index:e})}))},prevScreen:function(){return this.remain*this.screen[0]},nextScreen:function(){return this.remain*this.screen[1]},prevCount:function(){return Math.min(this.start,this.prevScreen)},leftPrevCount:function(){return Math.min(this.leftStart,this.prevScreen)},rightPrevCount:function(){return Math.min(this.rightStart,this.prevScreen)},nextCount:function(){return Math.min(this.data.length-this.end,this.nextScreen)},leftNextCount:function(){return this.waterfallInfo?Math.min(this.waterfallInfo.left.length-this.leftEnd,this.nextScreen):0},rightNextCount:function(){return this.waterfallInfo?Math.min(this.waterfallInfo.right.length-this.rightEnd,this.nextScreen):0}},watch:{deleteId:function(t){this.deleteItem(t)},data:function(t){var e,r,i=this;switch(this.type){case c.FIXED:this.$refs.scrollBar.style.height=t.length*this.size+this.unit;break;case c.VARIABLE:e=this.variableData.length,r=t.slice(e),this.variableData=[].concat(h(this.variableData),h(this.getVisiblePosition(r)));break;case c.WATERFALL:e=this.waterfallInfo.left.length+this.waterfallInfo.right.length,r=t.slice(e),this.handleWaterfallData(r);break}this.$nextTick((function(){i.$emit("domUpdateSuccess",i.type===c.WATERFALL?{renderLeftData:i.renderLeft,renderRightData:i.renderRight}:i.renderData),i.emitScrollEvent()}))}},created:function(){this.type===c.WATERFALL&&(this.waterfallInfo={left:[],right:[]}),this.getScrollFn=f()(this.handleScroll,this.interval,{leading:!1})},mounted:function(){if(this.type!==c.WATERFALL){if(!this.size)throw new Error("type为".concat(this.type,"时,请传入size属性"));this.$refs.scrollBar.style.height=this.data.length*this.size+this.unit,this.end=this.start+this.remain}switch(this.type){case c.FIXED:this.$refs.virtualList.style.height=this.remain*this.size+this.unit;break;case c.VARIABLE:this.variableData=[],this.$refs.virtualList.style.height=this.virtualHieght,this.variableData=this.getVisiblePosition(this.data);break;case c.WATERFALL:this.$refs.virtualList.style.height=this.$refs.scrollList.style.height=this.virtualHieght,this.leftEnd=this.leftStart+this.remain,this.rightEnd=this.rightStart+this.remain,this.data&&this.data.length&&this.handleWaterfallData(this.data);break}this.deleteId&&this.deleteItem(this.deleteId)},updated:function(){var t=this;this.$nextTick((function(){var e=t.$refs.nodes;t.type===c.VARIABLE&&e&&e.length&&(e.forEach((function(e){var r=e.getBoundingClientRect(),i=r.height,n=+e.getAttribute("vIndex"),a=t.variableData[n].height,o=a-i;if(o){t.variableData[n].height=i,t.variableData[n].bottom=t.variableData[n].bottom-o;for(var s=n+1;s<t.variableData.length;s++)t.variableData[s].top=t.variableData[s-1].bottom,t.variableData[s].bottom=t.variableData[s].bottom-o}})),t.$refs.scrollBar.style.height=t.variableData[t.variableData.length-1].bottom+t.unit)}))},methods:{deleteItem:function(t){var e=this.data.findIndex((function(e){return e.id==t}));if(e>-1){var r;if(this.data.splice(e,1),this.type===c.FIXED&&(r=this.data[e]),this.type===c.VARIABLE){r=this.variableData[e],this.variableData.splice(e,1);for(var i=r.index;i<this.variableData.length;i++)this.variableData[i].index=this.variableData[i].index-1,this.variableData[i].top=this.variableData[i].top-r.height,this.variableData[i].bottom=this.variableData[i].bottom-r.height}this.type===c.WATERFALL&&(this.waterfallInfo&&(r=[].concat(h(this.waterfallInfo.left),h(this.waterfallInfo.right)).find((function(e){return e.id==t}))),this.waterfallInfo={left:[],right:[]},this.leftHeight=this.rightHieght=0,this.handleWaterfallData(this.data)),this.$emit("deleteSuccess",r)}},setStyle:function(t){return 0===this.marginBottom?{height:t.height+this.unit}:{marginBottom:t.marginBottom+this.unit,height:t.height+this.unit}},handleWaterfallData:function(t){if(t.length){this.waterfallInfo.left.length&&(this.waterfallInfo.left[this.waterfallInfo.left.length-1].marginBottom=this.marginBottom),this.waterfallInfo.right.length&&(this.waterfallInfo.right[this.waterfallInfo.right.length-1].marginBottom=this.marginBottom);var e=this.waterfallGroup(t),r=e.left,i=e.right,n=[].concat(h(this.waterfallInfo.left),h(this.getWaterfallPosition(r,"left"))),a=[].concat(h(this.waterfallInfo.right),h(this.getWaterfallPosition(i,"right")));n[n.length-1].marginBottom=0,a[a.length-1].marginBottom=0,this.waterfallInfo={left:n,right:a},this.setWaterfallBarHeight()}},waterfallGroup:function(t){for(var e,r=[],i=[],n=0;e=t[n++];){e.marginBottom=this.marginBottom;var a=Number(e.height)+Number(e.marginBottom);this.leftHeight<=this.rightHieght?(this.leftHeight+=a,r.push(e)):(i.push(e),this.rightHieght+=a)}return{left:r,right:i}},setWaterfallBarHeight:function(){this.leftHeight>=this.rightHieght?this.$refs.scrollBar.style.height=this.leftHeight-this.marginBottom+this.unit:this.$refs.scrollBar.style.height=this.rightHieght-this.marginBottom+this.unit},getVisiblePosition:function(t){var e=this;if(!t.length)return[];var r=this.variableData?this.variableData.length:0,i=t.map((function(t,i){return{id:t.id,index:r+i,height:e.size,top:(r+i)*e.size,bottom:(r+i+1)*e.size}}));return i},getWaterfallPosition:function(t,e){if(!t.length)return[];for(var r=this.waterfallInfo[e],i=0;i<t.length;i++){t[i].index=r.length+i;var n=Number(t[i].height)+Number(this.marginBottom);0==i?r.length?(t[i].top=r[r.length-1].bottom,t[i].bottom=r[r.length-1].bottom+n):(t[i].top=0,t[i].bottom=n):(t[i].top=t[i-1].bottom,t[i].bottom=t[i-1].bottom+n)}return t},emitScrollEvent:function(){this.type===c.WATERFALL?this.$emit("scroll",{scrollTop:this.scrollTop,renderLeftScrollTop:this.scrollTop-this.leftOffset,renderRightScrollTop:this.scrollTop-this.rightOffset,renderLeftData:this.renderLeft,renderRightData:this.renderRight}):this.$emit("scroll",{scrollTop:this.scrollTop,renderScrollTop:this.scrollTop-this.offset,renderData:this.renderData})},handleScroll:function(){var t=this,e=this.scrollTop=this.$refs.virtualList.scrollTop;switch(this.type){case c.FIXED:this.start=Math.floor(e/this.size),this.end=this.start+this.remain,this.offset=this.start*this.size-this.prevCount*this.size;break;case c.VARIABLE:this.start=u(e,this.variableData),this.end=this.start+this.remain,this.offset=this.variableData[this.start-this.prevCount].top||0;break;case c.WATERFALL:this.leftStart=u(e,this.waterfallInfo.left),this.rightStart=u(e,this.waterfallInfo.right),this.leftEnd=this.leftStart+this.remain,this.rightEnd=this.rightStart+this.remain,this.leftOffset=this.waterfallInfo.left[this.leftStart-this.leftPrevCount].top||0,this.rightOffset=this.waterfallInfo.right[this.rightStart-this.rightPrevCount].top||0;break}this.$nextTick((function(){t.emitScrollEvent(),e+t.$refs.virtualList.clientHeight>=t.$refs.virtualList.scrollHeight-t.distance&&t.$emit("loadMore")}))}}},x=S;r("4636");function D(t,e,r,i,n,a,o,s){var l,f="function"===typeof t?t.options:t;if(e&&(f.render=e,f.staticRenderFns=r,f._compiled=!0),i&&(f.functional=!0),a&&(f._scopeId="data-v-"+a),o?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},f._ssrRegister=l):n&&(l=s?function(){n.call(this,(f.functional?this.parent:this).$root.$options.shadowRoot)}:n),l)if(f.functional){f._injectStyles=l;var u=f.render;f.render=function(t,e){return l.call(e),u(t,e)}}else{var c=f.beforeCreate;f.beforeCreate=c?[].concat(c,l):[l]}return{exports:t,options:f}}var I=D(x,o,s,!1,null,null,null),E=I.exports,O={install:function(t){t.component(E.name,E)}};e["default"]=O},ffd6:function(t,e,r){var i=r("3729"),n=r("1310"),a="[object Symbol]";function o(t){return"symbol"==typeof t||n(t)&&i(t)==a}t.exports=o}})})); //# sourceMappingURL=lite-virtual-list.umd.min.js.map