vue-better-scroll
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -6,3 +6,3 @@ !function(t,i){"object"==typeof exports&&"object"==typeof module?module.exports=i():"function"==typeof define&&define.amd?define("VueBetterScroller",[],i):"object"==typeof exports?exports.VueBetterScroller=i():t.VueBetterScroller=i()}(this,function(){return function(t){function i(s){if(e[s])return e[s].exports;var o=e[s]={i:s,l:!1,exports:{}};return t[s].call(o.exports,o,o.exports,i),o.l=!0,o.exports}var e={};return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:s})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},i.p="/dist/",i(i.s=7)}([function(t,i){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],i=0;i<this.length;i++){var e=this[i];e[2]?t.push("@media "+e[2]+"{"+e[1]+"}"):t.push(e[1])}return t.join("")},t.i=function(i,e){"string"==typeof i&&(i=[[null,i,""]]);for(var s={},o=0;o<this.length;o++){var n=this[o][0];"number"==typeof n&&(s[n]=!0)}for(o=0;o<i.length;o++){var r=i[o];"number"==typeof r[0]&&s[r[0]]||(e&&!r[2]?r[2]=e:e&&(r[2]="("+r[2]+") and ("+e+")"),t.push(r))}},t}},function(t,i){t.exports=function(t,i,e,s,o){var n,r=t=t||{},a=typeof t.default;"object"!==a&&"function"!==a||(n=t,r=t.default);var h="function"==typeof r?r.options:r;i&&(h.render=i.render,h.staticRenderFns=i.staticRenderFns),s&&(h._scopeId=s);var l;if(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__),e&&e.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},h._ssrRegister=l):e&&(l=e),l){var c=h.functional,p=c?h.render:h.beforeCreate;c?h.render=function(t,i){return l.call(i),p(t,i)}:h.beforeCreate=p?[].concat(p,l):[l]}return{esModule:n,exports:r,options:h}}},function(t,i,e){function s(t){for(var i=0;i<t.length;i++){var e=t[i],s=c[e.id];if(s){s.refs++;for(var o=0;o<s.parts.length;o++)s.parts[o](e.parts[o]);for(;o<e.parts.length;o++)s.parts.push(n(e.parts[o]));s.parts.length>e.parts.length&&(s.parts.length=e.parts.length)}else{for(var r=[],o=0;o<e.parts.length;o++)r.push(n(e.parts[o]));c[e.id]={id:e.id,refs:1,parts:r}}}}function o(){var t=document.createElement("style");return t.type="text/css",p.appendChild(t),t}function n(t){var i,e,s=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(s){if(f)return m;s.parentNode.removeChild(s)}if(g){var n=d++;s=u||(u=o()),i=r.bind(null,s,n,!1),e=r.bind(null,s,n,!0)}else s=o(),i=a.bind(null,s),e=function(){s.parentNode.removeChild(s)};return i(t),function(s){if(s){if(s.css===t.css&&s.media===t.media&&s.sourceMap===t.sourceMap)return;i(t=s)}else e()}}function r(t,i,e,s){var o=e?"":s.css;if(t.styleSheet)t.styleSheet.cssText=v(i,o);else{var n=document.createTextNode(o),r=t.childNodes;r[i]&&t.removeChild(r[i]),r.length?t.insertBefore(n,r[i]):t.appendChild(n)}}function a(t,i){var e=i.css,s=i.media,o=i.sourceMap;if(s&&t.setAttribute("media",s),o&&(e+="\n/*# sourceURL="+o.sources[0]+" */",e+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}var h="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!h)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 l=e(22),c={},p=h&&(document.head||document.getElementsByTagName("head")[0]),u=null,d=0,f=!1,m=function(){},g="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,i,e){f=e;var o=l(t,i);return s(o),function(i){for(var e=[],n=0;n<o.length;n++){var r=o[n],a=c[r.id];a.refs--,e.push(a)}i?(o=l(t,i),s(o)):o=[];for(var n=0;n<e.length;n++){var a=e[n];if(0===a.refs){for(var h=0;h<a.parts.length;h++)a.parts[h]();delete c[a.id]}}}};var v=function(){var t=[];return function(i,e){return t[i]=e,t.filter(Boolean).join("\n")}}()},function(t,i,e){function s(t){e(21)}var o=e(1)(e(5),e(18),s,null,null);t.exports=o.exports},function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default={props:{y:{type:Number,default:0}},data:function(){return{width:50,height:80}},computed:{distance:function(){return Math.max(0,Math.min(this.y*this.ratio,this.maxDistance))},style:function(){return"width:"+this.width/this.ratio+"px;height:"+this.height/this.ratio+"px"}},created:function(){this.ratio=window.devicePixelRatio,this.width*=this.ratio,this.height*=this.ratio,this.initRadius=18*this.ratio,this.minHeadRadius=12*this.ratio,this.minTailRadius=5*this.ratio,this.initArrowRadius=10*this.ratio,this.minArrowRadius=6*this.ratio,this.arrowWidth=3*this.ratio,this.maxDistance=40*this.ratio,this.initCenterX=25*this.ratio,this.initCenterY=25*this.ratio,this.headCenter={x:this.initCenterX,y:this.initCenterY}},mounted:function(){this._draw()},methods:{_draw:function(){var t=this.$refs.bubble,i=t.getContext("2d");i.clearRect(0,0,t.width,t.height),this._drawBubble(i),this._drawArrow(i)},_drawBubble:function(t){t.save(),t.beginPath();var i=this.distance/this.maxDistance,e=this.initRadius-(this.initRadius-this.minHeadRadius)*i;this.headCenter.y=this.initCenterY-(this.initRadius-this.minHeadRadius)*i,t.arc(this.headCenter.x,this.headCenter.y,e,0,Math.PI,!0);var s=this.initRadius-(this.initRadius-this.minTailRadius)*i,o={x:this.headCenter.x,y:this.headCenter.y+this.distance},n={x:o.x-s,y:o.y},r={x:n.x,y:n.y-this.distance/2};t.quadraticCurveTo(r.x,r.y,n.x,n.y),t.arc(o.x,o.y,s,Math.PI,0,!0);var a={x:this.headCenter.x+e,y:this.headCenter.y},h={x:o.x+s,y:a.y+this.distance/2};t.quadraticCurveTo(h.x,h.y,a.x,a.y),t.fillStyle="rgb(170,170,170)",t.fill(),t.strokeStyle="rgb(153,153,153)",t.stroke(),t.restore()},_drawArrow:function(t){t.save(),t.beginPath();var i=this.distance/this.maxDistance,e=this.initArrowRadius-(this.initArrowRadius-this.minArrowRadius)*i;t.arc(this.headCenter.x,this.headCenter.y,e-(this.arrowWidth-i),-Math.PI/2,0,!0),t.arc(this.headCenter.x,this.headCenter.y,e,0,3*Math.PI/2,!1),t.lineTo(this.headCenter.x,this.headCenter.y-e-this.arrowWidth/2+i),t.lineTo(this.headCenter.x+2*this.arrowWidth-2*i,this.headCenter.y-e+this.arrowWidth/2),t.lineTo(this.headCenter.x,this.headCenter.y-e+3*this.arrowWidth/2-i),t.fillStyle="rgb(255,255,255)",t.fill(),t.strokeStyle="rgb(170,170,170)",t.stroke(),t.restore()}},watch:{y:function(){this._draw()}}}},function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var s=e(8),o=e(9),n=e.n(o),r=e(15),a=e.n(r),h=e(14),l=e.n(h);i.default={name:"VueBetterScroller",props:{data:{type:Array,default:function(){return[]}},probeType:{type:Number,default:1},click:{type:Boolean,default:!0},listenScroll:{type:Boolean,default:!1},listenBeforeScroll:{type:Boolean,default:!1},direction:{type:String,default:"vertical"},scrollbar:{type:null,default:!1},pullDownRefresh:{type:null,default:!1},pullUpLoad:{type:null,default:!1},startY:{type:Number,default:0},refreshDelay:{type:Number,default:20},freeScroll:{type:Boolean,default:!1}},data:function(){return{beforePullDown:!0,isRebounding:!1,isPullingDown:!1,pulling:!1,isPullUpLoad:!1,pullUpDirty:!0,pullDownStyle:"",bubbleY:0}},computed:{pullUpTxt:function(){var t=this.pullUpLoad&&this.pullUpLoad.txt&&this.pullUpLoad.txt.more||"加载更多...",i=this.pullUpLoad&&this.pullUpLoad.txt&&this.pullUpLoad.txt.noMore||"没有更多";return this.pullUpDirty?t:i},refreshTxt:function(){return this.pullDownRefresh&&this.pullDownRefresh.txt||"下拉刷新"}},created:function(){this.pullDownInitTop=-50},mounted:function(){var t=this;setTimeout(function(){t.initScroll()},20)},methods:{initScroll:function(){var t=this;if(this.$refs.wrapper){this.$refs.list&&(this.pullDownRefresh||this.pullUpLoad)&&(this.$refs.list.style.minHeight=e.i(s.a)(this.$refs.wrapper).height+"px");var i={probeType:this.probeType,click:this.click,scrollY:this.freeScroll||"vertical"===this.direction,scrollX:this.freeScroll||"horizontal"===this.direction,scrollbar:this.scrollbar,pullDownRefresh:this.pullDownRefresh,pullUpLoad:this.pullUpLoad,startY:this.startY,freeScroll:this.freeScroll};this.scroll=new n.a(this.$refs.wrapper,i),this.listenScroll&&this.scroll.on("scroll",function(i){t.$emit("scroll",i)}),this.listenBeforeScroll&&this.scroll.on("beforeScrollStart",function(){t.$emit("beforeScrollStart")}),this.pullDownRefresh&&this._initPullDownRefresh(),this.pullUpLoad&&this._initPullUpLoad()}},disable:function(){this.scroll&&this.scroll.disable()},enable:function(){this.scroll&&this.scroll.enable()},refresh:function(){this.scroll&&this.scroll.refresh()},scrollTo:function(){this.scroll&&this.scroll.scrollTo.apply(this.scroll,arguments)},scrollToElement:function(){this.scroll&&this.scroll.scrollToElement.apply(this.scroll,arguments)},clickItem:function(t,i){console.log(t),this.$emit("click",i)},destroy:function(){this.scroll.destroy()},forceUpdate:function(t){var i=this;this.pullDownRefresh&&this.isPullingDown?(this.pulling=!1,this._reboundPullDown().then(function(){i._afterPullDown()})):this.pullUpLoad&&this.isPullUpLoad?(this.isPullUpLoad=!1,this.scroll.finishPullUp(),this.pullUpDirty=t,this.refresh()):this.refresh()},_initPullDownRefresh:function(){var t=this;this.scroll.on("pullingDown",function(){t.beforePullDown=!1,t.isPullingDown=!0,t.pulling=!0,t.$emit("pullingDown")}),this.scroll.on("scroll",function(i){t.beforePullDown?(t.bubbleY=Math.max(0,i.y+t.pullDownInitTop),t.pullDownStyle="top:"+Math.min(i.y+t.pullDownInitTop,10)+"px"):t.bubbleY=0,t.isRebounding&&(t.pullDownStyle="top:"+(10-(t.pullDownRefresh.stop-i.y))+"px")})},_initPullUpLoad:function(){var t=this;this.scroll.on("pullingUp",function(){t.isPullUpLoad=!0,t.$emit("pullingUp")})},_reboundPullDown:function(){var t=this,i=this.pullDownRefresh.stopTime,e=void 0===i?600:i;return new Promise(function(i){setTimeout(function(){t.isRebounding=!0,t.scroll.finishPullDown(),t.isPullingDown=!1,i()},e)})},_afterPullDown:function(){var t=this;setTimeout(function(){t.pullDownStyle="top:"+t.pullDownInitTop+"px",t.beforePullDown=!0,t.isRebounding=!1,t.refresh()},this.scroll.options.bounceTime)}},watch:{data:function(){var t=this;setTimeout(function(){t.forceUpdate(!0)},this.refreshDelay)}},components:{Loading:a.a,Bubble:l.a}}},function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});i.default={name:"loading"}},function(t,i,e){"use strict";function s(t){s.installed||(s.installed=!0,t.component(n.a.name,n.a))}Object.defineProperty(i,"__esModule",{value:!0});var o=e(3),n=e.n(o),r={install:s,VueBetterScroller:n.a};"undefined"!=typeof window&&window.Vue&&window.Vue.use(r),i.default=r},function(t,i,e){"use strict";function s(t){if(t instanceof window.SVGElement){var i=t.getBoundingClientRect();return{top:i.top,left:i.left,width:i.width,height:i.height}}return{top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}}i.a=s},function(t,i,e){/*! | ||
*/ | ||
!function(i,e){t.exports=e()}(0,function(){"use strict";function t(t){return!1!==x&&("standard"===x?t:x+t.charAt(0).toUpperCase()+t.substr(1))}function i(t,i,e,s){t.addEventListener(i,e,{passive:!1,capture:!!s})}function e(t,i,e,s){t.removeEventListener(i,e,{passive:!1,capture:!!s})}function s(t){for(var i=0,e=0;t;)i-=t.offsetLeft,e-=t.offsetTop,t=t.offsetParent;return{left:i,top:e}}function o(t){if(t instanceof window.SVGElement){var i=t.getBoundingClientRect();return{top:i.top,left:i.left,width:i.width,height:i.height}}return{top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}}function n(t,i){for(var e in i)if(i[e].test(t[e]))return!0;return!1}function r(t,i){var e=document.createEvent("Event");e.initEvent(i,!0,!0),e.pageX=t.pageX,e.pageY=t.pageY,t.target.dispatchEvent(e)}function a(t){var i=t.target;if(!/(SELECT|INPUT|TEXTAREA)/i.test(i.tagName)){var e=document.createEvent(window.MouseEvent?"MouseEvents":"Event");e.initEvent("click",!0,!1),e._constructed=!0,i.dispatchEvent(e)}}function h(t,i){i.firstChild?l(t,i.firstChild):i.appendChild(t)}function l(t,i){i.parentNode.insertBefore(t,i)}function c(){return window.performance&&window.performance.now?window.performance.now()+window.performance.timing.navigationStart:+new Date}function p(t){for(var i=arguments.length,e=Array(i>1?i-1:0),s=1;s<i;s++)e[s-1]=arguments[s];for(var o=0;o<e.length;o++){var n=e[o];for(var r in n)t[r]=n[r]}return t}function u(t,i,e,s,o,n){var r=t-i,a=Math.abs(r)/e,h=n.deceleration,l=n.itemHeight,c=n.swipeBounceTime,p=n.wheel,u=n.swipeTime,d=u,f=p?4:15,m=t+a/h*(r<0?-1:1);return p&&l&&(m=Math.round(m/l)*l),m<s?(m=o?s-o/f*a:s,d=c):m>0&&(m=o?o/f*a:0,d=c),{destination:Math.round(m),duration:d}}function d(t){var i=document.createElement("div"),e=document.createElement("div");return i.style.cssText="position:absolute;z-index:9999;pointerEvents:none",e.style.cssText="box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px;",e.className="bscroll-indicator","horizontal"===t?(i.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",e.style.height="100%",i.className="bscroll-horizontal-scrollbar"):(i.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",e.style.width="100%",i.className="bscroll-vertical-scrollbar"),i.style.cssText+=";overflow:hidden",i.appendChild(e),i}function f(t,i){this.wrapper=i.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=t,this.direction=i.direction,i.fade?(this.visible=0,this.wrapperStyle.opacity="0"):this.visible=1}function m(t){console.error("[BScroll warn]: "+t)}function g(t,i){this.wrapper="string"==typeof t?document.querySelector(t):t,this.wrapper||m("can not resolve the wrapper dom"),this.scroller=this.wrapper.children[0],this.scroller||m("the wrapper need at least one child element to be scroller"),this.scrollerStyle=this.scroller.style,this._init(t,i)}var v=function(){function t(t,i){var e=[],s=!0,o=!1,n=void 0;try{for(var r,a=t[Symbol.iterator]();!(s=(r=a.next()).done)&&(e.push(r.value),!i||e.length!==i);s=!0);}catch(t){o=!0,n=t}finally{try{!s&&a.return&&a.return()}finally{if(o)throw n}}return e}return function(i,e){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return t(i,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),y=function(t){if(Array.isArray(t)){for(var i=0,e=Array(t.length);i<t.length;i++)e[i]=t[i];return e}return Array.from(t)},w=document.createElement("div").style,x=function(){var t={webkit:"webkitTransform",Moz:"MozTransform",O:"OTransform",ms:"msTransform",standard:"transform"};for(var i in t)if(void 0!==w[t[i]])return i;return!1}(),b=t("transform"),T=t("perspective")in w,S="ontouchstart"in window,_=!1!==b,P=t("transition")in w,D={transform:b,transitionTimingFunction:t("transitionTimingFunction"),transitionDuration:t("transitionDuration"),transitionDelay:t("transitionDelay"),transformOrigin:t("transformOrigin"),transitionEnd:t("transitionEnd")},M=1,Y={touchstart:M,touchmove:M,touchend:M,mousedown:2,mousemove:2,mouseup:2},X={startX:0,startY:0,scrollX:!1,scrollY:!0,freeScroll:!1,directionLockThreshold:5,eventPassthrough:"",click:!1,tap:!1,bounce:!0,bounceTime:700,momentum:!0,momentumLimitTime:300,momentumLimitDistance:15,swipeTime:2500,swipeBounceTime:500,deceleration:.001,flickLimitTime:200,flickLimitDistance:100,resizePolling:60,probeType:0,preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:!1,disableMouse:S,disableTouch:!S,wheel:!1,snap:!1,scrollbar:!1,pullDownRefresh:!1,pullUpLoad:!1},C={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(t){return 1+--t*t*t*t*t}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(t){return 1- --t*t*t*t}}},E=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,(t.interval||100/60)/2)}}(),L=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||function(t){window.clearTimeout(t)}}();return f.prototype.refresh=function(){this.transitionTime(),this._calculate(),this.updatePosition()},f.prototype.fade=function(t,i){var e=this;if(!i||this.visible){var s=t?250:500;t=t?"1":"0",this.wrapperStyle[D.transitionDuration]=s+"ms",clearTimeout(this.fadeTimeout),this.fadeTimeout=setTimeout(function(){e.wrapperStyle.opacity=t,e.visible=+t},0)}},f.prototype.updatePosition=function(){if("vertical"===this.direction){var t=Math.round(this.sizeRatioY*this.scroller.y);if(t<0){this.transitionTime(500);var i=Math.max(this.indicatorHeight+3*t,8);this.indicatorStyle.height=i+"px",t=0}else if(t>this.maxPosY){this.transitionTime(500);var e=Math.max(this.indicatorHeight-3*(t-this.maxPosY),8);this.indicatorStyle.height=e+"px",t=this.maxPosY+this.indicatorHeight-e}else this.indicatorStyle.height=this.indicatorHeight+"px";this.y=t,this.scroller.options.useTransform?this.indicatorStyle[D.transform]="translateY("+t+"px)"+this.scroller.translateZ:this.indicatorStyle.top=t+"px"}else{var s=Math.round(this.sizeRatioX*this.scroller.x);if(s<0){this.transitionTime(500);var o=Math.max(this.indicatorWidth+3*s,8);this.indicatorStyle.width=o+"px",s=0}else if(s>this.maxPosX){this.transitionTime(500);var n=Math.max(this.indicatorWidth-3*(s-this.maxPosX),8);this.indicatorStyle.width=n+"px",s=this.maxPosX+this.indicatorWidth-n}else this.indicatorStyle.width=this.indicatorWidth+"px";this.x=s,this.scroller.options.useTransform?this.indicatorStyle[D.transform]="translateX("+s+"px)"+this.scroller.translateZ:this.indicatorStyle.left=s+"px"}},f.prototype.transitionTime=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.indicatorStyle[D.transitionDuration]=t+"ms"},f.prototype.transitionTimingFunction=function(t){this.indicatorStyle[D.transitionTimingFunction]=t},f.prototype.remove=function(){this.wrapper.parentNode.removeChild(this.wrapper)},f.prototype._calculate=function(){if("vertical"===this.direction){var t=this.wrapper.clientHeight;this.indicatorHeight=Math.max(Math.round(t*t/(this.scroller.scrollerHeight||t||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px",this.maxPosY=t-this.indicatorHeight,this.sizeRatioY=this.maxPosY/this.scroller.maxScrollY}else{var i=this.wrapper.clientWidth;this.indicatorWidth=Math.max(Math.round(i*i/(this.scroller.scrollerWidth||i||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px",this.maxPosX=i-this.indicatorWidth,this.sizeRatioX=this.maxPosX/this.scroller.maxScrollX}},function(t){t.prototype._init=function(t,i){this._handleOptions(i),this._events={},this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._addDOMEvents(),this._initExtFeatures(),this.refresh(),this.options.snap||this.scrollTo(this.options.startX,this.options.startY),this.enable()},t.prototype._handleOptions=function(t){this.options=p({},X,t),this.translateZ=this.options.HWCompositing&&T?" translateZ(0)":"",this.options.useTransition=this.options.useTransition&&P,this.options.useTransform=this.options.useTransform&&_,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollX="horizontal"!==this.options.eventPassthrough&&this.options.scrollX,this.options.scrollY="vertical"!==this.options.eventPassthrough&&this.options.scrollY,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,!0===this.options.tap&&(this.options.tap="tap")},t.prototype._addDOMEvents=function(){var t=i;this._handleDOMEvents(t)},t.prototype._removeDOMEvents=function(){var t=e;this._handleDOMEvents(t)},t.prototype._handleDOMEvents=function(t){var i=this.options.bindToWrapper?this.wrapper:window;t(window,"orientationchange",this),t(window,"resize",this),this.options.click&&t(this.wrapper,"click",this,!0),this.options.disableMouse||(t(this.wrapper,"mousedown",this),t(i,"mousemove",this),t(i,"mousecancel",this),t(i,"mouseup",this)),S&&!this.options.disableTouch&&(t(this.wrapper,"touchstart",this),t(i,"touchmove",this),t(i,"touchcancel",this),t(i,"touchend",this)),t(this.scroller,D.transitionEnd,this)},t.prototype._initExtFeatures=function(){this.options.snap&&this._initSnap(),this.options.scrollbar&&this._initScrollbar(),this.options.pullUpLoad&&this._initPullUp()},t.prototype.handleEvent=function(t){switch(t.type){case"touchstart":case"mousedown":this._start(t);break;case"touchmove":case"mousemove":this._move(t);break;case"touchend":case"mouseup":case"touchcancel":case"mousecancel":this._end(t);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(t);break;case"click":this.enabled&&!t._constructed&&(t.preventDefault(),t.stopPropagation())}},t.prototype.refresh=function(){var t=o(this.wrapper);this.wrapperWidth=t.width,this.wrapperHeight=t.height;var i=o(this.scroller);this.scrollerWidth=i.width,this.scrollerHeight=i.height;var e=this.options.wheel;e?(this.items=this.scroller.children,this.options.itemHeight=this.itemHeight=this.items.length?this.scrollerHeight/this.items.length:0,void 0===this.selectedIndex&&(this.selectedIndex=e.selectedIndex),this.options.startY=-this.selectedIndex*this.itemHeight,this.maxScrollX=0,this.maxScrollY=-this.itemHeight*(this.items.length-1)):(this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.maxScrollY=this.wrapperHeight-this.scrollerHeight),this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=s(this.wrapper),this.trigger("refresh"),this.resetPosition()},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1}}(g),function(t){t.prototype._start=function(t){var i=Y[t.type];if((i===M||0===t.button)&&!(!this.enabled||this.destroyed||this.initiated&&this.initiated!==i)){this.initiated=i,this.options.preventDefault&&!n(t.target,this.options.preventDefaultException)&&t.preventDefault(),this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.movingDirectionX=0,this.movingDirectionY=0,this.directionLocked=0,this._transitionTime(),this.startTime=c(),this.options.wheel&&(this.target=t.target),this.stop();var e=t.touches?t.touches[0]:t;this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=e.pageX,this.pointY=e.pageY,this.trigger("beforeScrollStart")}},t.prototype._move=function(t){if(this.enabled&&!this.destroyed&&Y[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault();var i=t.touches?t.touches[0]:t,e=i.pageX-this.pointX,s=i.pageY-this.pointY;this.pointX=i.pageX,this.pointY=i.pageY,this.distX+=e,this.distY+=s;var o=Math.abs(this.distX),n=Math.abs(this.distY),r=c();if(!(r-this.endTime>this.options.momentumLimitTime&&n<this.options.momentumLimitDistance&&o<this.options.momentumLimitDistance)){if(this.directionLocked||this.options.freeScroll||(o>n+this.options.directionLockThreshold?this.directionLocked="h":n>=o+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"===this.directionLocked){if("vertical"===this.options.eventPassthrough)t.preventDefault();else if("horizontal"===this.options.eventPassthrough)return void(this.initiated=!1);s=0}else if("v"===this.directionLocked){if("horizontal"===this.options.eventPassthrough)t.preventDefault();else if("vertical"===this.options.eventPassthrough)return void(this.initiated=!1);e=0}e=this.hasHorizontalScroll?e:0,s=this.hasVerticalScroll?s:0,this.movingDirectionX=e>0?-1:e<0?1:0,this.movingDirectionY=s>0?-1:s<0?1:0;var a=this.x+e,h=this.y+s;(a>0||a<this.maxScrollX)&&(a=this.options.bounce?this.x+e/3:a>0?0:this.maxScrollX),(h>0||h<this.maxScrollY)&&(h=this.options.bounce?this.y+s/3:h>0?0:this.maxScrollY),this.moved||(this.moved=!0,this.trigger("scrollStart")),this._translate(a,h),r-this.startTime>this.options.momentumLimitTime&&(this.startTime=r,this.startX=this.x,this.startY=this.y,1===this.options.probeType&&this.trigger("scroll",{x:this.x,y:this.y})),this.options.probeType>1&&this.trigger("scroll",{x:this.x,y:this.y});var l=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,p=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,u=this.pointX-l,d=this.pointY-p;(u>document.documentElement.clientWidth-this.options.momentumLimitDistance||u<this.options.momentumLimitDistance||d<this.options.momentumLimitDistance||d>document.documentElement.clientHeight-this.options.momentumLimitDistance)&&this._end(t)}}},t.prototype._end=function(t){if(this.enabled&&!this.destroyed&&Y[t.type]===this.initiated&&(this.initiated=!1,this.options.preventDefault&&!n(t.target,this.options.preventDefaultException)&&t.preventDefault(),this.trigger("touchEnd",{x:this.x,y:this.y}),!(this.options.pullDownRefresh&&this._checkPullDown()||this.resetPosition(this.options.bounceTime,C.bounce)))){this.isInTransition=!1;var i=Math.round(this.x),e=Math.round(this.y);if(!this.moved){if(this.options.wheel){if(this.target&&"wheel-scroll"===this.target.className){var o=Math.abs(Math.round(e/this.itemHeight)),h=Math.round((this.pointY+s(this.target).top-this.itemHeight/2)/this.itemHeight);this.target=this.items[o+h]}this.scrollToElement(this.target,this.options.wheel.adjustTime||400,!0,!0,C.swipe)}else this.options.tap&&r(t,this.options.tap),this.options.click&&a(t);return void this.trigger("scrollCancel")}this.scrollTo(i,e);var l=i-this.absStartX,p=e-this.absStartY;this.directionX=l>0?-1:l<0?1:0,this.directionY=p>0?-1:p<0?1:0,this.endTime=c();var d=this.endTime-this.startTime,f=Math.abs(i-this.startX),m=Math.abs(e-this.startY);if(this._events.flick&&d<this.options.flickLimitTime&&f<this.options.flickLimitDistance&&m<this.options.flickLimitDistance)return void this.trigger("flick");var g=0;if(this.options.momentum&&d<this.options.momentumLimitTime&&(m>this.options.momentumLimitDistance||f>this.options.momentumLimitDistance)){var v=this.hasHorizontalScroll?u(this.x,this.startX,d,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options):{destination:i,duration:0},y=this.hasVerticalScroll?u(this.y,this.startY,d,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options):{destination:e,duration:0};i=v.destination,e=y.destination,g=Math.max(v.duration,y.duration),this.isInTransition=1}else this.options.wheel&&(e=Math.round(e/this.itemHeight)*this.itemHeight,g=this.options.wheel.adjustTime||400);var w=C.swipe;if(this.options.snap){var x=this._nearestSnap(i,e);this.currentPage=x,g=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(i-x.x),1e3),Math.min(Math.abs(e-x.y),1e3)),300),i=x.x,e=x.y,this.directionX=0,this.directionY=0,w=C.bounce}if(i!==this.x||e!==this.y)return(i>0||i<this.maxScrollX||e>0||e<this.maxScrollY)&&(w=C.swipeBounce),void this.scrollTo(i,e,g,w);this.options.wheel&&(this.selectedIndex=0|Math.abs(this.y/this.itemHeight)),this.trigger("scrollEnd",{x:this.x,y:this.y})}},t.prototype._resize=function(){var t=this;this.enabled&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){t.refresh()},this.options.resizePolling))},t.prototype._startProbe=function(){function t(){if(i.isInTransition){var e=i.getComputedPosition();i.trigger("scroll",e),i.probeTimer=E(t)}}L(this.probeTimer),this.probeTimer=E(t);var i=this},t.prototype._transitionTime=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.scrollerStyle[D.transitionDuration]=t+"ms",this.options.wheel)for(var i=0;i<this.items.length;i++)this.items[i].style[D.transitionDuration]=t+"ms";if(this.indicators)for(var e=0;e<this.indicators.length;e++)this.indicators[e].transitionTime(t)},t.prototype._transitionTimingFunction=function(t){if(this.scrollerStyle[D.transitionTimingFunction]=t,this.options.wheel)for(var i=0;i<this.items.length;i++)this.items[i].style[D.transitionTimingFunction]=t;if(this.indicators)for(var e=0;e<this.indicators.length;e++)this.indicators[e].transitionTimingFunction(t)},t.prototype._transitionEnd=function(t){t.target===this.scroller&&this.isInTransition&&(this._transitionTime(),this.pulling||this.resetPosition(this.options.bounceTime,C.bounce)||(this.isInTransition=!1,this.trigger("scrollEnd",{x:this.x,y:this.y})))},t.prototype._translate=function(t,i){if(this.options.useTransform?this.scrollerStyle[D.transform]="translate("+t+"px,"+i+"px)"+this.translateZ:(t=Math.round(t),i=Math.round(i),this.scrollerStyle.left=t+"px",this.scrollerStyle.top=i+"px"),this.options.wheel)for(var e=this.options.wheel.rotate,s=void 0===e?25:e,o=0;o<this.items.length;o++){var n=s*(i/this.itemHeight+o);this.items[o].style[D.transform]="rotateX("+n+"deg)"}if(this.x=t,this.y=i,this.indicators)for(var r=0;r<this.indicators.length;r++)this.indicators[r].updatePosition()},t.prototype._animate=function(t,i,e,s){function o(){var p=c();if(p>=l)return n.isAnimating=!1,n._translate(t,i),void(n.pulling||n.resetPosition(n.options.bounceTime)||n.trigger("scrollEnd",{x:n.x,y:n.y}));p=(p-h)/e;var u=s(p),d=(t-r)*u+r,f=(i-a)*u+a;n._translate(d,f),n.isAnimating&&(n.animateTimer=E(o)),3===n.options.probeType&&n.trigger("scroll",{x:this.x,y:this.y})}var n=this,r=this.x,a=this.y,h=c(),l=h+e;this.isAnimating=!0,L(this.animateTimer),o()},t.prototype.scrollBy=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C.bounce;t=this.x+t,i=this.y+i,this.scrollTo(t,i,e,s)},t.prototype.scrollTo=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C.bounce;this.isInTransition=this.options.useTransition&&e>0&&(t!==this.x||i!==this.y),!e||this.options.useTransition?(this._transitionTimingFunction(s.style),this._transitionTime(e),this._translate(t,i),e&&3===this.options.probeType&&this._startProbe(),this.options.wheel&&(i>0?this.selectedIndex=0:i<this.maxScrollY?this.selectedIndex=this.items.length-1:this.selectedIndex=0|Math.abs(i/this.itemHeight))):this._animate(t,i,e,s.fn)},t.prototype.scrollToElement=function(t,i,e,o,n){if(t&&(t=t.nodeType?t:this.scroller.querySelector(t),!this.options.wheel||"wheel-item"===t.className)){var r=s(t);r.left-=this.wrapperOffset.left,r.top-=this.wrapperOffset.top,!0===e&&(e=Math.round(t.offsetWidth/2-this.wrapper.offsetWidth/2)),!0===o&&(o=Math.round(t.offsetHeight/2-this.wrapper.offsetHeight/2)),r.left-=e||0,r.top-=o||0,r.left=r.left>0?0:r.left<this.maxScrollX?this.maxScrollX:r.left,r.top=r.top>0?0:r.top<this.maxScrollY?this.maxScrollY:r.top,this.options.wheel&&(r.top=Math.round(r.top/this.itemHeight)*this.itemHeight),this.scrollTo(r.left,r.top,i,n)}},t.prototype.resetPosition=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C.bounce,e=this.x;!this.hasHorizontalScroll||e>0?e=0:e<this.maxScrollX&&(e=this.maxScrollX);var s=this.y;return!this.hasVerticalScroll||s>0?s=0:s<this.maxScrollY&&(s=this.maxScrollY),(e!==this.x||s!==this.y)&&(this.scrollTo(e,s,t,i),!0)},t.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.scroller,null),i=void 0,e=void 0;return this.options.useTransform?(t=t[D.transform].split(")")[0].split(", "),i=+(t[12]||t[4]),e=+(t[13]||t[5])):(i=+t.left.replace(/[^-\d.]/g,""),e=+t.top.replace(/[^-\d.]/g,"")),{x:i,y:e}},t.prototype.stop=function(){if(this.options.useTransition&&this.isInTransition){this.isInTransition=!1;var t=this.getComputedPosition();this._translate(t.x,t.y),this.options.wheel?this.target=this.items[Math.round(-t.y/this.itemHeight)]:this.trigger("scrollEnd",{x:this.x,y:this.y})}else!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this.trigger("scrollEnd",{x:this.x,y:this.y}))},t.prototype.destroy=function(){this._removeDOMEvents(),this.options.scrollbar&&this._removeScrollBars(),this.destroyed=!0,this.trigger("destroy")}}(g),function(t){t.prototype.on=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;this._events[t]||(this._events[t]=[]),this._events[t].push([i,e])},t.prototype.once=function(t,i){function e(){this.off(t,e),o||(o=!0,i.apply(s,arguments))}var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,o=!1;this.on(t,e)},t.prototype.off=function(t,i){var e=this._events[t];if(e)for(var s=e.length;s--;)e[s][0]===i&&(e[s][0]=void 0)},t.prototype.trigger=function(t){var i=this._events[t];if(i)for(var e=i.length,s=[].concat(y(i)),o=0;o<e;o++){var n=s[o],r=v(n,2),a=r[0],h=r[1];a&&a.apply(h,[].slice.call(arguments,1))}}}(g),function(t){t.prototype._initSnap=function(){var t=this;this.currentPage={};var i=this.options.snap;if(i.loop){var e=this.scroller.children;e.length>0&&(h(e[e.length-1].cloneNode(!0),this.scroller),this.scroller.appendChild(e[1].cloneNode(!0)))}var s=i.el;"string"==typeof s&&(s=this.scroller.querySelectorAll(s)),this.on("refresh",function(){if(t.pages=[],t.wrapperWidth&&t.wrapperHeight&&t.scrollerWidth&&t.scrollerHeight){var e=i.stepX||t.wrapperWidth,n=i.stepY||t.wrapperHeight,r=0,a=void 0,h=void 0,l=void 0,c=0,p=void 0,u=0,d=void 0,f=void 0;if(s)for(p=s.length,d=-1;c<p;c++)f=o(s[c]),(0===c||f.left<=o(s[c-1]).left)&&(u=0,d++),t.pages[u]||(t.pages[u]=[]),r=Math.max(-f.left,t.maxScrollX),a=Math.max(-f.top,t.maxScrollY),h=r-Math.round(f.width/2),l=a-Math.round(f.height/2),t.pages[u][d]={x:r,y:a,width:f.width,height:f.height,cx:h,cy:l},r>t.maxScrollX&&u++;else for(h=Math.round(e/2),l=Math.round(n/2);r>-t.scrollerWidth;){for(t.pages[c]=[],p=0,a=0;a>-t.scrollerHeight;)t.pages[c][p]={x:Math.max(r,t.maxScrollX),y:Math.max(a,t.maxScrollY),width:e,height:n,cx:r-h,cy:a-l},a-=n,p++;r-=e,c++}var m=i.loop?1:0;t.goToPage(t.currentPage.pageX||m,t.currentPage.pageY||0,0);var g=i.threshold;g%1==0?(t.snapThresholdX=g,t.snapThresholdY=g):(t.snapThresholdX=Math.round(t.pages[t.currentPage.pageX][t.currentPage.pageY].width*g),t.snapThresholdY=Math.round(t.pages[t.currentPage.pageX][t.currentPage.pageY].height*g))}}),this.on("scrollEnd",function(){i.loop&&(0===t.currentPage.pageX&&t.goToPage(t.pages.length-2,t.currentPage.pageY,0),t.currentPage.pageX===t.pages.length-1&&t.goToPage(1,t.currentPage.pageY,0))}),!1!==i.listenFlick&&this.on("flick",function(){var e=i.speed||Math.max(Math.max(Math.min(Math.abs(t.x-t.startX),1e3),Math.min(Math.abs(t.y-t.startY),1e3)),300);t.goToPage(t.currentPage.pageX+t.directionX,t.currentPage.pageY+t.directionY,e)})},t.prototype._nearestSnap=function(t,i){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var e=0;if(Math.abs(t-this.absStartX)<=this.snapThresholdX&&Math.abs(i-this.absStartY)<=this.snapThresholdY)return this.currentPage;t>0?t=0:t<this.maxScrollX&&(t=this.maxScrollX),i>0?i=0:i<this.maxScrollY&&(i=this.maxScrollY);for(var s=this.pages.length;e<s;e++)if(t>=this.pages[e][0].cx){t=this.pages[e][0].x;break}s=this.pages[e].length;for(var o=0;o<s;o++)if(i>=this.pages[0][o].cy){i=this.pages[0][o].y;break}return e===this.currentPage.pageX&&(e+=this.directionX,e<0?e=0:e>=this.pages.length&&(e=this.pages.length-1),t=this.pages[e][0].x),o===this.currentPage.pageY&&(o+=this.directionY,o<0?o=0:o>=this.pages[0].length&&(o=this.pages[0].length-1),i=this.pages[0][o].y),{x:t,y:i,pageX:e,pageY:o}},t.prototype.goToPage=function(t,i,e){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C.bounce,o=this.options.snap;t>=this.pages.length?t=this.pages.length-1:t<0&&(t=0),i>=this.pages[t].length?i=this.pages[t].length-1:i<0&&(i=0);var n=this.pages[t][i].x,r=this.pages[t][i].y;e=void 0===e?o.speed||Math.max(Math.max(Math.min(Math.abs(n-this.x),1e3),Math.min(Math.abs(r-this.y),1e3)),300):e,this.currentPage={x:n,y:r,pageX:t,pageY:i},this.scrollTo(n,r,e,s)},t.prototype.next=function(t,i){var e=this.currentPage.pageX,s=this.currentPage.pageY;e++,e>=this.pages.length&&this.hasVerticalScroll&&(e=0,s++),this.goToPage(e,s,t,i)},t.prototype.prev=function(t,i){var e=this.currentPage.pageX,s=this.currentPage.pageY;e--,e<0&&this.hasVerticalScroll&&(e=0,s--),this.goToPage(e,s,t,i)},t.prototype.getCurrentPage=function(){return this.options.snap&&this.currentPage}}(g),function(t){t.prototype.wheelTo=function(t){this.options.wheel&&(this.y=-t*this.itemHeight,this.scrollTo(0,this.y))},t.prototype.getSelectedIndex=function(){return this.options.wheel&&this.selectedIndex}}(g),function(t){t.prototype._initScrollbar=function(){var t=this,i=this.options.scrollbar.fade,e=void 0===i||i;this.indicators=[];var s=void 0;this.options.scrollX&&(s={el:d("horizontal"),direction:"horizontal",fade:e},this._insertScrollBar(s.el),this.indicators.push(new f(this,s))),this.options.scrollY&&(s={el:d("vertical"),direction:"vertical",fade:e},this._insertScrollBar(s.el),this.indicators.push(new f(this,s))),this.on("refresh",function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].refresh()}),e&&(this.on("scrollEnd",function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].fade()}),this.on("scrollCancel",function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].fade()}),this.on("scrollStart",function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].fade(!0)}),this.on("beforeScrollStart",function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].fade(!0,!0)}))},t.prototype._insertScrollBar=function(t){this.wrapper.appendChild(t)},t.prototype._removeScrollBars=function(){for(var t=0;t<this.indicators.length;t++)this.indicators[t].remove()}}(g),function(t){t.prototype._checkPullDown=function(){var t=this.options.pullDownRefresh,i=t.threshold,e=void 0===i?90:i,s=t.stop,o=void 0===s?40:s;return this.y>e&&!this.pulling&&(this.pulling=!0,this.trigger("pullingDown"),this.scrollTo(this.x,o,this.options.bounceTime,C.bounce)),this.pulling},t.prototype.finishPullDown=function(){this.pulling=!1,this.resetPosition(this.options.bounceTime,C.bounce)}}(g),function(t){t.prototype._initPullUp=function(){this.options.probeType=3,this.pullupWatching=!1,this._watchPullUp()},t.prototype._watchPullUp=function(){function t(i){1===this.movingDirectionY&&i.y<=this.maxScrollY+e&&(this.trigger("pullingUp"),this.pullupWatching=!1,this.off("scroll",t))}if(!this.pullupWatching){this.pullupWatching=!0;var i=this.options.pullUpLoad.threshold,e=void 0===i?0:i;this.on("scroll",t)}},t.prototype.finishPullUp=function(){var t=this;this.isInTransition?this.once("scrollEnd",function(){t._watchPullUp()}):this._watchPullUp()}}(g),g.Version="1.3.0",g})},function(t,i,e){i=t.exports=e(0)(),i.push([t.i,".mf-loading-container img{width:20px;height:20px;display:block}",""])},function(t,i,e){i=t.exports=e(0)(),i.push([t.i,"",""])},function(t,i,e){i=t.exports=e(0)(),i.push([t.i,".list-wrapper{position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;background:#fff}.list-wrapper .list-content{position:relative;z-index:10;background:#fff}.list-wrapper .list-content .list-item{height:60px;line-height:60px;font-size:18px;padding-left:20px;border-bottom:1px solid #e5e5e5}.pulldown-wrapper{position:absolute;width:100%;left:0;display:flex;justify-content:center;align-items:center;transition:all}.pulldown-wrapper .after-trigger{margin-top:10px}.pullup-wrapper{width:100%;display:flex;justify-content:center;align-items:center;padding:16px 0}",""])},function(t,i,e){t.exports=e.p+"loading.gif?1f26c50bb56f9f5aba4a0d2b287987e2"},function(t,i,e){function s(t){e(20)}var o=e(1)(e(4),e(17),s,"data-v-1904950e",null);t.exports=o.exports},function(t,i,e){function s(t){e(19)}var o=e(1)(e(6),e(16),s,null,null);t.exports=o.exports},function(t,i,e){t.exports={render:function(){var t=this,i=t.$createElement;t._self._c;return t._m(0)},staticRenderFns:[function(){var t=this,i=t.$createElement,s=t._self._c||i;return s("div",{staticClass:"mf-loading-container"},[s("img",{attrs:{src:e(13)}})])}]}},function(t,i){t.exports={render:function(){var t=this,i=t.$createElement;return(t._self._c||i)("canvas",{ref:"bubble",style:t.style,attrs:{width:t.width,height:t.height}})},staticRenderFns:[]}},function(t,i){t.exports={render:function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{ref:"wrapper",staticClass:"list-wrapper"},[e("div",{staticClass:"scroll-content"},[t._t("default",[e("ul",{ref:"list",staticClass:"list-content"},t._l(t.data,function(i,s){return e("li",{key:s,staticClass:"list-item",on:{click:function(e){t.clickItem(e,i)}}},[t._v(t._s(i))])}))]),t._v(" "),t._t("pullup",[t.pullUpLoad?e("div",{staticClass:"pullup-wrapper"},[t.isPullUpLoad?e("div",{staticClass:"after-trigger"},[e("loading")],1):e("div",{staticClass:"before-trigger"},[e("span",[t._v(t._s(t.pullUpTxt))])])]):t._e()],{pullUpLoad:t.pullUpLoad,isPullUpLoad:t.isPullUpLoad})],2),t._v(" "),t._t("pulldown",[t.pullDownRefresh?e("div",{ref:"pulldown",staticClass:"pulldown-wrapper",style:t.pullDownStyle},[t.beforePullDown?e("div",{staticClass:"before-trigger"},[e("bubble",{attrs:{y:t.bubbleY}})],1):e("div",{staticClass:"after-trigger"},[t.pulling?e("div",{staticClass:"loading"},[e("loading")],1):e("div",[e("span",[t._v(t._s(t.refreshTxt))])])])]):t._e()],{pullDownRefresh:t.pullDownRefresh,pullDownStyle:t.pullDownStyle,beforePullDown:t.beforePullDown,pulling:t.pulling,bubbleY:t.bubbleY})],2)},staticRenderFns:[]}},function(t,i,e){var s=e(10);"string"==typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);e(2)("e36f834c",s,!0)},function(t,i,e){var s=e(11);"string"==typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);e(2)("1386b47e",s,!0)},function(t,i,e){var s=e(12);"string"==typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);e(2)("638f875b",s,!0)},function(t,i){t.exports=function(t,i){for(var e=[],s={},o=0;o<i.length;o++){var n=i[o],r=n[0],a=n[1],h=n[2],l=n[3],c={id:t+":"+o,css:a,media:h,sourceMap:l};s[r]?s[r].parts.push(c):e.push(s[r]={id:r,parts:[c]})}return e}}])}); | ||
!function(i,e){t.exports=e()}(0,function(){"use strict";function t(t){return!1!==x&&("standard"===x?t:x+t.charAt(0).toUpperCase()+t.substr(1))}function i(t,i,e,s){t.addEventListener(i,e,{passive:!1,capture:!!s})}function e(t,i,e,s){t.removeEventListener(i,e,{passive:!1,capture:!!s})}function s(t){for(var i=0,e=0;t;)i-=t.offsetLeft,e-=t.offsetTop,t=t.offsetParent;return{left:i,top:e}}function o(t){if(t instanceof window.SVGElement){var i=t.getBoundingClientRect();return{top:i.top,left:i.left,width:i.width,height:i.height}}return{top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}}function n(t,i){for(var e in i)if(i[e].test(t[e]))return!0;return!1}function r(t,i){var e=document.createEvent("Event");e.initEvent(i,!0,!0),e.pageX=t.pageX,e.pageY=t.pageY,t.target.dispatchEvent(e)}function a(t){var i=t.target;if(!/(SELECT|INPUT|TEXTAREA)/i.test(i.tagName)){var e=document.createEvent(window.MouseEvent?"MouseEvents":"Event");e.initEvent("click",!0,!1),e._constructed=!0,i.dispatchEvent(e)}}function h(t,i){i.firstChild?l(t,i.firstChild):i.appendChild(t)}function l(t,i){i.parentNode.insertBefore(t,i)}function c(){return window.performance&&window.performance.now?window.performance.now()+window.performance.timing.navigationStart:+new Date}function p(t){for(var i=arguments.length,e=Array(i>1?i-1:0),s=1;s<i;s++)e[s-1]=arguments[s];for(var o=0;o<e.length;o++){var n=e[o];for(var r in n)t[r]=n[r]}return t}function u(t,i,e,s,o,n){var r=t-i,a=Math.abs(r)/e,h=n.deceleration,l=n.itemHeight,c=n.swipeBounceTime,p=n.wheel,u=n.swipeTime,d=u,f=p?4:15,m=t+a/h*(r<0?-1:1);return p&&l&&(m=Math.round(m/l)*l),m<s?(m=o?s-o/f*a:s,d=c):m>0&&(m=o?o/f*a:0,d=c),{destination:Math.round(m),duration:d}}function d(t){var i=document.createElement("div"),e=document.createElement("div");return i.style.cssText="position:absolute;z-index:9999;pointerEvents:none",e.style.cssText="box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px;",e.className="bscroll-indicator","horizontal"===t?(i.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",e.style.height="100%",i.className="bscroll-horizontal-scrollbar"):(i.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",e.style.width="100%",i.className="bscroll-vertical-scrollbar"),i.style.cssText+=";overflow:hidden",i.appendChild(e),i}function f(t,i){this.wrapper=i.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=t,this.direction=i.direction,i.fade?(this.visible=0,this.wrapperStyle.opacity="0"):this.visible=1}function m(t){console.error("[BScroll warn]: "+t)}function g(t,i){this.wrapper="string"==typeof t?document.querySelector(t):t,this.wrapper||m("can not resolve the wrapper dom"),this.scroller=this.wrapper.children[0],this.scroller||m("the wrapper need at least one child element to be scroller"),this.scrollerStyle=this.scroller.style,this._init(t,i)}var v=function(){function t(t,i){var e=[],s=!0,o=!1,n=void 0;try{for(var r,a=t[Symbol.iterator]();!(s=(r=a.next()).done)&&(e.push(r.value),!i||e.length!==i);s=!0);}catch(t){o=!0,n=t}finally{try{!s&&a.return&&a.return()}finally{if(o)throw n}}return e}return function(i,e){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return t(i,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),y=function(t){if(Array.isArray(t)){for(var i=0,e=Array(t.length);i<t.length;i++)e[i]=t[i];return e}return Array.from(t)},w=document.createElement("div").style,x=function(){var t={webkit:"webkitTransform",Moz:"MozTransform",O:"OTransform",ms:"msTransform",standard:"transform"};for(var i in t)if(void 0!==w[t[i]])return i;return!1}(),b=t("transform"),T=t("perspective")in w,S="ontouchstart"in window,_=!1!==b,P=t("transition")in w,D={transform:b,transitionTimingFunction:t("transitionTimingFunction"),transitionDuration:t("transitionDuration"),transitionDelay:t("transitionDelay"),transformOrigin:t("transformOrigin"),transitionEnd:t("transitionEnd")},M=1,Y={touchstart:M,touchmove:M,touchend:M,mousedown:2,mousemove:2,mouseup:2},X={startX:0,startY:0,scrollX:!1,scrollY:!0,freeScroll:!1,directionLockThreshold:5,eventPassthrough:"",click:!1,tap:!1,bounce:!0,bounceTime:700,momentum:!0,momentumLimitTime:300,momentumLimitDistance:15,swipeTime:2500,swipeBounceTime:500,deceleration:.001,flickLimitTime:200,flickLimitDistance:100,resizePolling:60,probeType:0,preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:!1,disableMouse:S,disableTouch:!S,wheel:!1,snap:!1,scrollbar:!1,pullDownRefresh:!1,pullUpLoad:!1},C={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(t){return 1+--t*t*t*t*t}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(t){return 1- --t*t*t*t}}},E=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,(t.interval||100/60)/2)}}(),L=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||function(t){window.clearTimeout(t)}}();return f.prototype.refresh=function(){this.transitionTime(),this._calculate(),this.updatePosition()},f.prototype.fade=function(t,i){var e=this;if(!i||this.visible){var s=t?250:500;t=t?"1":"0",this.wrapperStyle[D.transitionDuration]=s+"ms",clearTimeout(this.fadeTimeout),this.fadeTimeout=setTimeout(function(){e.wrapperStyle.opacity=t,e.visible=+t},0)}},f.prototype.updatePosition=function(){if("vertical"===this.direction){var t=Math.round(this.sizeRatioY*this.scroller.y);if(t<0){this.transitionTime(500);var i=Math.max(this.indicatorHeight+3*t,8);this.indicatorStyle.height=i+"px",t=0}else if(t>this.maxPosY){this.transitionTime(500);var e=Math.max(this.indicatorHeight-3*(t-this.maxPosY),8);this.indicatorStyle.height=e+"px",t=this.maxPosY+this.indicatorHeight-e}else this.indicatorStyle.height=this.indicatorHeight+"px";this.y=t,this.scroller.options.useTransform?this.indicatorStyle[D.transform]="translateY("+t+"px)"+this.scroller.translateZ:this.indicatorStyle.top=t+"px"}else{var s=Math.round(this.sizeRatioX*this.scroller.x);if(s<0){this.transitionTime(500);var o=Math.max(this.indicatorWidth+3*s,8);this.indicatorStyle.width=o+"px",s=0}else if(s>this.maxPosX){this.transitionTime(500);var n=Math.max(this.indicatorWidth-3*(s-this.maxPosX),8);this.indicatorStyle.width=n+"px",s=this.maxPosX+this.indicatorWidth-n}else this.indicatorStyle.width=this.indicatorWidth+"px";this.x=s,this.scroller.options.useTransform?this.indicatorStyle[D.transform]="translateX("+s+"px)"+this.scroller.translateZ:this.indicatorStyle.left=s+"px"}},f.prototype.transitionTime=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.indicatorStyle[D.transitionDuration]=t+"ms"},f.prototype.transitionTimingFunction=function(t){this.indicatorStyle[D.transitionTimingFunction]=t},f.prototype.remove=function(){this.wrapper.parentNode.removeChild(this.wrapper)},f.prototype._calculate=function(){if("vertical"===this.direction){var t=this.wrapper.clientHeight;this.indicatorHeight=Math.max(Math.round(t*t/(this.scroller.scrollerHeight||t||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px",this.maxPosY=t-this.indicatorHeight,this.sizeRatioY=this.maxPosY/this.scroller.maxScrollY}else{var i=this.wrapper.clientWidth;this.indicatorWidth=Math.max(Math.round(i*i/(this.scroller.scrollerWidth||i||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px",this.maxPosX=i-this.indicatorWidth,this.sizeRatioX=this.maxPosX/this.scroller.maxScrollX}},function(t){t.prototype._init=function(t,i){this._handleOptions(i),this._events={},this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._addDOMEvents(),this._initExtFeatures(),this.refresh(),this.options.snap||this.scrollTo(this.options.startX,this.options.startY),this.enable()},t.prototype._handleOptions=function(t){this.options=p({},X,t),this.translateZ=this.options.HWCompositing&&T?" translateZ(0)":"",this.options.useTransition=this.options.useTransition&&P,this.options.useTransform=this.options.useTransform&&_,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollX="horizontal"!==this.options.eventPassthrough&&this.options.scrollX,this.options.scrollY="vertical"!==this.options.eventPassthrough&&this.options.scrollY,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,!0===this.options.tap&&(this.options.tap="tap")},t.prototype._addDOMEvents=function(){var t=i;this._handleDOMEvents(t)},t.prototype._removeDOMEvents=function(){var t=e;this._handleDOMEvents(t)},t.prototype._handleDOMEvents=function(t){var i=this.options.bindToWrapper?this.wrapper:window;t(window,"orientationchange",this),t(window,"resize",this),this.options.click&&t(this.wrapper,"click",this,!0),this.options.disableMouse||(t(this.wrapper,"mousedown",this),t(i,"mousemove",this),t(i,"mousecancel",this),t(i,"mouseup",this)),S&&!this.options.disableTouch&&(t(this.wrapper,"touchstart",this),t(i,"touchmove",this),t(i,"touchcancel",this),t(i,"touchend",this)),t(this.scroller,D.transitionEnd,this)},t.prototype._initExtFeatures=function(){this.options.snap&&this._initSnap(),this.options.scrollbar&&this._initScrollbar(),this.options.pullUpLoad&&this._initPullUp()},t.prototype.handleEvent=function(t){switch(t.type){case"touchstart":case"mousedown":this._start(t);break;case"touchmove":case"mousemove":this._move(t);break;case"touchend":case"mouseup":case"touchcancel":case"mousecancel":this._end(t);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(t);break;case"click":this.enabled&&!t._constructed&&(t.preventDefault(),t.stopPropagation())}},t.prototype.refresh=function(){var t=o(this.wrapper);this.wrapperWidth=t.width,this.wrapperHeight=t.height;var i=o(this.scroller);this.scrollerWidth=i.width,this.scrollerHeight=i.height;var e=this.options.wheel;e?(this.items=this.scroller.children,this.options.itemHeight=this.itemHeight=this.items.length?this.scrollerHeight/this.items.length:0,void 0===this.selectedIndex&&(this.selectedIndex=e.selectedIndex),this.options.startY=-this.selectedIndex*this.itemHeight,this.maxScrollX=0,this.maxScrollY=-this.itemHeight*(this.items.length-1)):(this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.maxScrollY=this.wrapperHeight-this.scrollerHeight),this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=s(this.wrapper),this.trigger("refresh"),this.resetPosition()},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1}}(g),function(t){t.prototype._start=function(t){var i=Y[t.type];if((i===M||0===t.button)&&!(!this.enabled||this.destroyed||this.initiated&&this.initiated!==i)){this.initiated=i,this.options.preventDefault&&!n(t.target,this.options.preventDefaultException)&&t.preventDefault(),this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.movingDirectionX=0,this.movingDirectionY=0,this.directionLocked=0,this._transitionTime(),this.startTime=c(),this.options.wheel&&(this.target=t.target),this.stop();var e=t.touches?t.touches[0]:t;this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=e.pageX,this.pointY=e.pageY,this.trigger("beforeScrollStart")}},t.prototype._move=function(t){if(this.enabled&&!this.destroyed&&Y[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault();var i=t.touches?t.touches[0]:t,e=i.pageX-this.pointX,s=i.pageY-this.pointY;this.pointX=i.pageX,this.pointY=i.pageY,this.distX+=e,this.distY+=s;var o=Math.abs(this.distX),n=Math.abs(this.distY),r=c();if(!(r-this.endTime>this.options.momentumLimitTime&&n<this.options.momentumLimitDistance&&o<this.options.momentumLimitDistance)){if(this.directionLocked||this.options.freeScroll||(o>n+this.options.directionLockThreshold?this.directionLocked="h":n>=o+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"===this.directionLocked){if("vertical"===this.options.eventPassthrough)t.preventDefault();else if("horizontal"===this.options.eventPassthrough)return void(this.initiated=!1);s=0}else if("v"===this.directionLocked){if("horizontal"===this.options.eventPassthrough)t.preventDefault();else if("vertical"===this.options.eventPassthrough)return void(this.initiated=!1);e=0}e=this.hasHorizontalScroll?e:0,s=this.hasVerticalScroll?s:0,this.movingDirectionX=e>0?-1:e<0?1:0,this.movingDirectionY=s>0?-1:s<0?1:0;var a=this.x+e,h=this.y+s;(a>0||a<this.maxScrollX)&&(a=this.options.bounce?this.x+e/3:a>0?0:this.maxScrollX),(h>0||h<this.maxScrollY)&&(h=this.options.bounce?this.y+s/3:h>0?0:this.maxScrollY),this.moved||(this.moved=!0,this.trigger("scrollStart")),this._translate(a,h),r-this.startTime>this.options.momentumLimitTime&&(this.startTime=r,this.startX=this.x,this.startY=this.y,1===this.options.probeType&&this.trigger("scroll",{x:this.x,y:this.y})),this.options.probeType>1&&this.trigger("scroll",{x:this.x,y:this.y});var l=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,p=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,u=this.pointX-l,d=this.pointY-p;(u>document.documentElement.clientWidth-this.options.momentumLimitDistance||u<this.options.momentumLimitDistance||d<this.options.momentumLimitDistance||d>document.documentElement.clientHeight-this.options.momentumLimitDistance)&&this._end(t)}}},t.prototype._end=function(t){if(this.enabled&&!this.destroyed&&Y[t.type]===this.initiated&&(this.initiated=!1,this.options.preventDefault&&!n(t.target,this.options.preventDefaultException)&&t.preventDefault(),this.trigger("touchEnd",{x:this.x,y:this.y}),!(this.options.pullDownRefresh&&this._checkPullDown()||this.resetPosition(this.options.bounceTime,C.bounce)))){this.isInTransition=!1;var i=Math.round(this.x),e=Math.round(this.y);if(!this.moved){if(this.options.wheel){if(this.target&&"wheel-scroll"===this.target.className){var o=Math.abs(Math.round(e/this.itemHeight)),h=Math.round((this.pointY+s(this.target).top-this.itemHeight/2)/this.itemHeight);this.target=this.items[o+h]}this.scrollToElement(this.target,this.options.wheel.adjustTime||400,!0,!0,C.swipe)}else this.options.tap&&r(t,this.options.tap),this.options.click&&a(t);return void this.trigger("scrollCancel")}this.scrollTo(i,e);var l=i-this.absStartX,p=e-this.absStartY;this.directionX=l>0?-1:l<0?1:0,this.directionY=p>0?-1:p<0?1:0,this.endTime=c();var d=this.endTime-this.startTime,f=Math.abs(i-this.startX),m=Math.abs(e-this.startY);if(this._events.flick&&d<this.options.flickLimitTime&&f<this.options.flickLimitDistance&&m<this.options.flickLimitDistance)return void this.trigger("flick");var g=0;if(this.options.momentum&&d<this.options.momentumLimitTime&&(m>this.options.momentumLimitDistance||f>this.options.momentumLimitDistance)){var v=this.hasHorizontalScroll?u(this.x,this.startX,d,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options):{destination:i,duration:0},y=this.hasVerticalScroll?u(this.y,this.startY,d,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options):{destination:e,duration:0};i=v.destination,e=y.destination,g=Math.max(v.duration,y.duration),this.isInTransition=1}else this.options.wheel&&(e=Math.round(e/this.itemHeight)*this.itemHeight,g=this.options.wheel.adjustTime||400);var w=C.swipe;if(this.options.snap){var x=this._nearestSnap(i,e);this.currentPage=x,g=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(i-x.x),1e3),Math.min(Math.abs(e-x.y),1e3)),300),i=x.x,e=x.y,this.directionX=0,this.directionY=0,w=C.bounce}if(i!==this.x||e!==this.y)return(i>0||i<this.maxScrollX||e>0||e<this.maxScrollY)&&(w=C.swipeBounce),void this.scrollTo(i,e,g,w);this.options.wheel&&(this.selectedIndex=0|Math.abs(this.y/this.itemHeight)),this.trigger("scrollEnd",{x:this.x,y:this.y})}},t.prototype._resize=function(){var t=this;this.enabled&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){t.refresh()},this.options.resizePolling))},t.prototype._startProbe=function(){function t(){if(i.isInTransition){var e=i.getComputedPosition();i.trigger("scroll",e),i.probeTimer=E(t)}}L(this.probeTimer),this.probeTimer=E(t);var i=this},t.prototype._transitionTime=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.scrollerStyle[D.transitionDuration]=t+"ms",this.options.wheel)for(var i=0;i<this.items.length;i++)this.items[i].style[D.transitionDuration]=t+"ms";if(this.indicators)for(var e=0;e<this.indicators.length;e++)this.indicators[e].transitionTime(t)},t.prototype._transitionTimingFunction=function(t){if(this.scrollerStyle[D.transitionTimingFunction]=t,this.options.wheel)for(var i=0;i<this.items.length;i++)this.items[i].style[D.transitionTimingFunction]=t;if(this.indicators)for(var e=0;e<this.indicators.length;e++)this.indicators[e].transitionTimingFunction(t)},t.prototype._transitionEnd=function(t){t.target===this.scroller&&this.isInTransition&&(this._transitionTime(),this.pulling||this.resetPosition(this.options.bounceTime,C.bounce)||(this.isInTransition=!1,this.trigger("scrollEnd",{x:this.x,y:this.y})))},t.prototype._translate=function(t,i){if(this.options.useTransform?this.scrollerStyle[D.transform]="translate("+t+"px,"+i+"px)"+this.translateZ:(t=Math.round(t),i=Math.round(i),this.scrollerStyle.left=t+"px",this.scrollerStyle.top=i+"px"),this.options.wheel)for(var e=this.options.wheel.rotate,s=void 0===e?25:e,o=0;o<this.items.length;o++){var n=s*(i/this.itemHeight+o);this.items[o].style[D.transform]="rotateX("+n+"deg)"}if(this.x=t,this.y=i,this.indicators)for(var r=0;r<this.indicators.length;r++)this.indicators[r].updatePosition()},t.prototype._animate=function(t,i,e,s){function o(){var p=c();if(p>=l)return n.isAnimating=!1,n._translate(t,i),void(n.pulling||n.resetPosition(n.options.bounceTime)||n.trigger("scrollEnd",{x:n.x,y:n.y}));p=(p-h)/e;var u=s(p),d=(t-r)*u+r,f=(i-a)*u+a;n._translate(d,f),n.isAnimating&&(n.animateTimer=E(o)),3===n.options.probeType&&n.trigger("scroll",{x:this.x,y:this.y})}var n=this,r=this.x,a=this.y,h=c(),l=h+e;this.isAnimating=!0,L(this.animateTimer),o()},t.prototype.scrollBy=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C.bounce;t=this.x+t,i=this.y+i,this.scrollTo(t,i,e,s)},t.prototype.scrollTo=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C.bounce;this.isInTransition=this.options.useTransition&&e>0&&(t!==this.x||i!==this.y),!e||this.options.useTransition?(this._transitionTimingFunction(s.style),this._transitionTime(e),this._translate(t,i),e&&3===this.options.probeType&&this._startProbe(),this.options.wheel&&(i>0?this.selectedIndex=0:i<this.maxScrollY?this.selectedIndex=this.items.length-1:this.selectedIndex=0|Math.abs(i/this.itemHeight))):this._animate(t,i,e,s.fn)},t.prototype.scrollToElement=function(t,i,e,o,n){if(t&&(t=t.nodeType?t:this.scroller.querySelector(t),!this.options.wheel||"wheel-item"===t.className)){var r=s(t);r.left-=this.wrapperOffset.left,r.top-=this.wrapperOffset.top,!0===e&&(e=Math.round(t.offsetWidth/2-this.wrapper.offsetWidth/2)),!0===o&&(o=Math.round(t.offsetHeight/2-this.wrapper.offsetHeight/2)),r.left-=e||0,r.top-=o||0,r.left=r.left>0?0:r.left<this.maxScrollX?this.maxScrollX:r.left,r.top=r.top>0?0:r.top<this.maxScrollY?this.maxScrollY:r.top,this.options.wheel&&(r.top=Math.round(r.top/this.itemHeight)*this.itemHeight),this.scrollTo(r.left,r.top,i,n)}},t.prototype.resetPosition=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C.bounce,e=this.x;!this.hasHorizontalScroll||e>0?e=0:e<this.maxScrollX&&(e=this.maxScrollX);var s=this.y;return!this.hasVerticalScroll||s>0?s=0:s<this.maxScrollY&&(s=this.maxScrollY),(e!==this.x||s!==this.y)&&(this.scrollTo(e,s,t,i),!0)},t.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.scroller,null),i=void 0,e=void 0;return this.options.useTransform?(t=t[D.transform].split(")")[0].split(", "),i=+(t[12]||t[4]),e=+(t[13]||t[5])):(i=+t.left.replace(/[^-\d.]/g,""),e=+t.top.replace(/[^-\d.]/g,"")),{x:i,y:e}},t.prototype.stop=function(){if(this.options.useTransition&&this.isInTransition){this.isInTransition=!1;var t=this.getComputedPosition();this._translate(t.x,t.y),this.options.wheel?this.target=this.items[Math.round(-t.y/this.itemHeight)]:this.trigger("scrollEnd",{x:this.x,y:this.y})}else!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this.trigger("scrollEnd",{x:this.x,y:this.y}))},t.prototype.destroy=function(){this._removeDOMEvents(),this.options.scrollbar&&this._removeScrollBars(),this.destroyed=!0,this.trigger("destroy")}}(g),function(t){t.prototype.on=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;this._events[t]||(this._events[t]=[]),this._events[t].push([i,e])},t.prototype.once=function(t,i){function e(){this.off(t,e),o||(o=!0,i.apply(s,arguments))}var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,o=!1;this.on(t,e)},t.prototype.off=function(t,i){var e=this._events[t];if(e)for(var s=e.length;s--;)e[s][0]===i&&(e[s][0]=void 0)},t.prototype.trigger=function(t){var i=this._events[t];if(i)for(var e=i.length,s=[].concat(y(i)),o=0;o<e;o++){var n=s[o],r=v(n,2),a=r[0],h=r[1];a&&a.apply(h,[].slice.call(arguments,1))}}}(g),function(t){t.prototype._initSnap=function(){var t=this;this.currentPage={};var i=this.options.snap;if(i.loop){var e=this.scroller.children;e.length>0&&(h(e[e.length-1].cloneNode(!0),this.scroller),this.scroller.appendChild(e[1].cloneNode(!0)))}var s=i.el;"string"==typeof s&&(s=this.scroller.querySelectorAll(s)),this.on("refresh",function(){if(t.pages=[],t.wrapperWidth&&t.wrapperHeight&&t.scrollerWidth&&t.scrollerHeight){var e=i.stepX||t.wrapperWidth,n=i.stepY||t.wrapperHeight,r=0,a=void 0,h=void 0,l=void 0,c=0,p=void 0,u=0,d=void 0,f=void 0;if(s)for(p=s.length,d=-1;c<p;c++)f=o(s[c]),(0===c||f.left<=o(s[c-1]).left)&&(u=0,d++),t.pages[u]||(t.pages[u]=[]),r=Math.max(-f.left,t.maxScrollX),a=Math.max(-f.top,t.maxScrollY),h=r-Math.round(f.width/2),l=a-Math.round(f.height/2),t.pages[u][d]={x:r,y:a,width:f.width,height:f.height,cx:h,cy:l},r>t.maxScrollX&&u++;else for(h=Math.round(e/2),l=Math.round(n/2);r>-t.scrollerWidth;){for(t.pages[c]=[],p=0,a=0;a>-t.scrollerHeight;)t.pages[c][p]={x:Math.max(r,t.maxScrollX),y:Math.max(a,t.maxScrollY),width:e,height:n,cx:r-h,cy:a-l},a-=n,p++;r-=e,c++}var m=i.loop?1:0;t.goToPage(t.currentPage.pageX||m,t.currentPage.pageY||0,0);var g=i.threshold;g%1==0?(t.snapThresholdX=g,t.snapThresholdY=g):(t.snapThresholdX=Math.round(t.pages[t.currentPage.pageX][t.currentPage.pageY].width*g),t.snapThresholdY=Math.round(t.pages[t.currentPage.pageX][t.currentPage.pageY].height*g))}}),this.on("scrollEnd",function(){i.loop&&(0===t.currentPage.pageX&&t.goToPage(t.pages.length-2,t.currentPage.pageY,0),t.currentPage.pageX===t.pages.length-1&&t.goToPage(1,t.currentPage.pageY,0))}),!1!==i.listenFlick&&this.on("flick",function(){var e=i.speed||Math.max(Math.max(Math.min(Math.abs(t.x-t.startX),1e3),Math.min(Math.abs(t.y-t.startY),1e3)),300);t.goToPage(t.currentPage.pageX+t.directionX,t.currentPage.pageY+t.directionY,e)})},t.prototype._nearestSnap=function(t,i){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var e=0;if(Math.abs(t-this.absStartX)<=this.snapThresholdX&&Math.abs(i-this.absStartY)<=this.snapThresholdY)return this.currentPage;t>0?t=0:t<this.maxScrollX&&(t=this.maxScrollX),i>0?i=0:i<this.maxScrollY&&(i=this.maxScrollY);for(var s=this.pages.length;e<s;e++)if(t>=this.pages[e][0].cx){t=this.pages[e][0].x;break}s=this.pages[e].length;for(var o=0;o<s;o++)if(i>=this.pages[0][o].cy){i=this.pages[0][o].y;break}return e===this.currentPage.pageX&&(e+=this.directionX,e<0?e=0:e>=this.pages.length&&(e=this.pages.length-1),t=this.pages[e][0].x),o===this.currentPage.pageY&&(o+=this.directionY,o<0?o=0:o>=this.pages[0].length&&(o=this.pages[0].length-1),i=this.pages[0][o].y),{x:t,y:i,pageX:e,pageY:o}},t.prototype.goToPage=function(t,i,e){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C.bounce,o=this.options.snap;t>=this.pages.length?t=this.pages.length-1:t<0&&(t=0),i>=this.pages[t].length?i=this.pages[t].length-1:i<0&&(i=0);var n=this.pages[t][i].x,r=this.pages[t][i].y;e=void 0===e?o.speed||Math.max(Math.max(Math.min(Math.abs(n-this.x),1e3),Math.min(Math.abs(r-this.y),1e3)),300):e,this.currentPage={x:n,y:r,pageX:t,pageY:i},this.scrollTo(n,r,e,s)},t.prototype.next=function(t,i){var e=this.currentPage.pageX,s=this.currentPage.pageY;e++,e>=this.pages.length&&this.hasVerticalScroll&&(e=0,s++),this.goToPage(e,s,t,i)},t.prototype.prev=function(t,i){var e=this.currentPage.pageX,s=this.currentPage.pageY;e--,e<0&&this.hasVerticalScroll&&(e=0,s--),this.goToPage(e,s,t,i)},t.prototype.getCurrentPage=function(){return this.options.snap&&this.currentPage}}(g),function(t){t.prototype.wheelTo=function(t){this.options.wheel&&(this.y=-t*this.itemHeight,this.scrollTo(0,this.y))},t.prototype.getSelectedIndex=function(){return this.options.wheel&&this.selectedIndex}}(g),function(t){t.prototype._initScrollbar=function(){var t=this,i=this.options.scrollbar.fade,e=void 0===i||i;this.indicators=[];var s=void 0;this.options.scrollX&&(s={el:d("horizontal"),direction:"horizontal",fade:e},this._insertScrollBar(s.el),this.indicators.push(new f(this,s))),this.options.scrollY&&(s={el:d("vertical"),direction:"vertical",fade:e},this._insertScrollBar(s.el),this.indicators.push(new f(this,s))),this.on("refresh",function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].refresh()}),e&&(this.on("scrollEnd",function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].fade()}),this.on("scrollCancel",function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].fade()}),this.on("scrollStart",function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].fade(!0)}),this.on("beforeScrollStart",function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].fade(!0,!0)}))},t.prototype._insertScrollBar=function(t){this.wrapper.appendChild(t)},t.prototype._removeScrollBars=function(){for(var t=0;t<this.indicators.length;t++)this.indicators[t].remove()}}(g),function(t){t.prototype._checkPullDown=function(){var t=this.options.pullDownRefresh,i=t.threshold,e=void 0===i?90:i,s=t.stop,o=void 0===s?40:s;return this.y>e&&!this.pulling&&(this.pulling=!0,this.trigger("pullingDown"),this.scrollTo(this.x,o,this.options.bounceTime,C.bounce)),this.pulling},t.prototype.finishPullDown=function(){this.pulling=!1,this.resetPosition(this.options.bounceTime,C.bounce)}}(g),function(t){t.prototype._initPullUp=function(){this.options.probeType=3,this.pullupWatching=!1,this._watchPullUp()},t.prototype._watchPullUp=function(){function t(i){1===this.movingDirectionY&&i.y<=this.maxScrollY+e&&(this.trigger("pullingUp"),this.pullupWatching=!1,this.off("scroll",t))}if(!this.pullupWatching){this.pullupWatching=!0;var i=this.options.pullUpLoad.threshold,e=void 0===i?0:i;this.on("scroll",t)}},t.prototype.finishPullUp=function(){var t=this;this.isInTransition?this.once("scrollEnd",function(){t._watchPullUp()}):this._watchPullUp()}}(g),g.Version="1.3.0",g})},function(t,i,e){i=t.exports=e(0)(),i.push([t.i,".mf-loading-container img{width:20px;height:20px;display:block}",""])},function(t,i,e){i=t.exports=e(0)(),i.push([t.i,"",""])},function(t,i,e){i=t.exports=e(0)(),i.push([t.i,".list-wrapper{position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;background:#fff}.list-wrapper .list-content{position:relative;z-index:10;background:#fff}.list-wrapper .list-content .list-item{height:60px;line-height:60px;font-size:18px;padding-left:20px;border-bottom:1px solid #e5e5e5}.pulldown-wrapper{position:absolute;width:100%;left:0;display:flex;justify-content:center;align-items:center;transition:all}.pulldown-wrapper .after-trigger{margin-top:10px}.pullup-wrapper{width:100%;display:flex;justify-content:center;align-items:center;padding:16px 0}",""])},function(t,i,e){t.exports=e.p+"loading.gif?1f26c50bb56f9f5aba4a0d2b287987e2"},function(t,i,e){function s(t){e(20)}var o=e(1)(e(4),e(17),s,"data-v-1904950e",null);t.exports=o.exports},function(t,i,e){function s(t){e(19)}var o=e(1)(e(6),e(16),s,null,null);t.exports=o.exports},function(t,i,e){t.exports={render:function(){var t=this,i=t.$createElement,s=t._self._c||i;return s("div",{staticClass:"mf-loading-container"},[s("img",{attrs:{src:e(13)}})])},staticRenderFns:[]}},function(t,i){t.exports={render:function(){var t=this,i=t.$createElement;return(t._self._c||i)("canvas",{ref:"bubble",style:t.style,attrs:{width:t.width,height:t.height}})},staticRenderFns:[]}},function(t,i){t.exports={render:function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{ref:"wrapper",staticClass:"list-wrapper"},[e("div",{staticClass:"scroll-content"},[t._t("default",[e("ul",{ref:"list",staticClass:"list-content"},t._l(t.data,function(i,s){return e("li",{key:s,staticClass:"list-item",on:{click:function(e){t.clickItem(e,i)}}},[t._v(t._s(i))])}))]),t._v(" "),t._t("pullup",[t.pullUpLoad?e("div",{staticClass:"pullup-wrapper"},[t.isPullUpLoad?e("div",{staticClass:"after-trigger"},[e("loading")],1):e("div",{staticClass:"before-trigger"},[e("span",[t._v(t._s(t.pullUpTxt))])])]):t._e()],{pullUpLoad:t.pullUpLoad,isPullUpLoad:t.isPullUpLoad})],2),t._v(" "),t._t("pulldown",[t.pullDownRefresh?e("div",{ref:"pulldown",staticClass:"pulldown-wrapper",style:t.pullDownStyle},[t.beforePullDown?e("div",{staticClass:"before-trigger"},[e("bubble",{attrs:{y:t.bubbleY}})],1):e("div",{staticClass:"after-trigger"},[t.pulling?e("div",{staticClass:"loading"},[e("loading")],1):e("div",[e("span",[t._v(t._s(t.refreshTxt))])])])]):t._e()],{pullDownRefresh:t.pullDownRefresh,pullDownStyle:t.pullDownStyle,beforePullDown:t.beforePullDown,pulling:t.pulling,bubbleY:t.bubbleY})],2)},staticRenderFns:[]}},function(t,i,e){var s=e(10);"string"==typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);e(2)("e36f834c",s,!0)},function(t,i,e){var s=e(11);"string"==typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);e(2)("1386b47e",s,!0)},function(t,i,e){var s=e(12);"string"==typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);e(2)("638f875b",s,!0)},function(t,i){t.exports=function(t,i){for(var e=[],s={},o=0;o<i.length;o++){var n=i[o],r=n[0],a=n[1],h=n[2],l=n[3],c={id:t+":"+o,css:a,media:h,sourceMap:l};s[r]?s[r].parts.push(c):e.push(s[r]={id:r,parts:[c]})}return e}}])}); | ||
//# sourceMappingURL=vue-better-scroller.js.map |
{ | ||
"name": "vue-better-scroll", | ||
"description": "a vue scroll component width better-scroll", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"author": "惊鸦 <506755679@qq.com>", | ||
@@ -6,0 +6,0 @@ "private": false, |
@@ -5,15 +5,8 @@ # vue-better-scroll | ||
## Build Setup | ||
## webpack的配置 | ||
``` bash | ||
# install dependencies | ||
npm install | ||
entry: 指向'./src/lib/index.js', 是为了生成打包后的文件,打包后的文件才是package.json中指向的文件; | ||
# serve with hot reload at localhost:8080 | ||
npm run dev | ||
### 问题 | ||
# build for production with minification | ||
npm run build | ||
``` | ||
For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader). | ||
1. 图片地址的问题; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
483526
20
11