tab-scroll
Version:
1 lines • 24.3 kB
JavaScript
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("better-scroll"));else if("function"==typeof define&&define.amd)define(["better-scroll"],e);else{var n="object"==typeof exports?e(require("better-scroll")):e(t["better-scroll"]);for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,function(t){return r={},e.m=n=[function(t,e,n){t.exports=!n(6)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(e,n){e.exports=t},function(t,e,n){var r=n(5),o=n(14),i=n(10),c=Object.defineProperty;e.f=n(0)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(2);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(51);"string"==typeof r&&(r=[[t.i,r,""]]);n(29)(r,{hmr:!0,transform:void 0,insertInto:void 0}),r.locals&&(t.exports=r.locals)},function(t,e,n){var r=n(54);"string"==typeof r&&(r=[[t.i,r,""]]);n(29)(r,{hmr:!0,transform:void 0,insertInto:void 0}),r.locals&&(t.exports=r.locals)},function(t,e,n){var r=n(2);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(36),o=n(20);t.exports=function(t){return r(o(t))}},function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){t.exports=!n(0)&&!n(6)(function(){return 7!=Object.defineProperty(n(15)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(2),o=n(1).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(34);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(35),o=n(19),i=n(11),c=n(10),s=n(7),l=n(14),a=Object.getOwnPropertyDescriptor;e.f=n(0)?a:function(t,e){if(t=i(t),e=c(e,!0),l)try{return a(t,e)}catch(t){}if(s(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(7),o=n(11),i=n(38)(!1),c=n(23)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),l=0,a=[];for(n in s)n!=c&&r(s,n)&&a.push(n);for(;e.length>l;)r(s,n=e[l++])&&(~i(a,n)||a.push(n));return a}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0<t?r:n)(t)}},function(t,e,n){var r=n(24)("keys"),o=n(25);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(12),o=n(1),i="__core-js_shared__",c=o[i]||(o[i]={});(t.exports=function(t,e){return c[t]||(c[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(41)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(4),o=n(19);t.exports=n(0)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(1),o=n(26),i=n(7),c=n(25)("src"),s=n(44),l="toString",a=(""+s).split(l);n(12).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var l="function"==typeof n;l&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(l&&(i(n,c)||o(n,c,t[e]?""+t[e]:a.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,l,function(){return"function"==typeof this&&this[c]||s.call(this)})},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(r),i=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(i).concat([o]).join("\n")}return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];null!=i&&(r[i]=!0)}for(o=0;o<t.length;o++){var c=t[o];null!=c[0]&&r[c[0]]||(n&&!c[2]?c[2]=n:n&&(c[2]="("+c[2]+") and ("+n+")"),e.push(c))}},e}},function(t,e,n){var r,o,i,c={},s=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=r.apply(this,arguments)),o}),l=(i={},function(t,e){if("function"==typeof t)return t();if(void 0===i[t]){var n=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}i[t]=n}return i[t]}),a=null,u=0,f=[],p=n(52);function h(t,e){for(var n=0;n<t.length;n++){var r=t[n],o=c[r.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](r.parts[i]);for(;i<r.parts.length;i++)o.parts.push(g(r.parts[i],e))}else{var s=[];for(i=0;i<r.parts.length;i++)s.push(g(r.parts[i],e));c[r.id]={id:r.id,refs:1,parts:s}}}}function d(t,e){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],c=e.base?i[0]+e.base:i[0],s={css:i[1],media:i[2],sourceMap:i[3]};r[c]?r[c].parts.push(s):n.push(r[c]={id:c,parts:[s]})}return n}function v(t,e){var n=l(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=f[f.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),f.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=l(t.insertAt.before,n);n.insertBefore(e,o)}}function m(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=f.indexOf(t);0<=e&&f.splice(e,1)}function y(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=n.nc;r&&(t.attrs.nonce=r)}return S(e,t.attrs),v(t,e),e}function S(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function g(t,e){var n,r,o,i;if(e.transform&&t.css){if(!(i="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=i}if(e.singleton){var c=u++;n=a=a||y(e),r=x.bind(null,n,c,!1),o=x.bind(null,n,c,!0)}else o=t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",S(e,t.attrs),v(t,e),e}(e),r=function(t,e,n){var r=n.css,o=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(r=p(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var c=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(c),s&&URL.revokeObjectURL(s)}.bind(null,n,e),function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(e),r=function(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),function(){m(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=s()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=d(t,e);return h(n,e),function(t){for(var r=[],o=0;o<n.length;o++){var i=n[o];(s=c[i.id]).refs--,r.push(s)}for(t&&h(d(t,e),e),o=0;o<r.length;o++){var s;if(0===(s=r[o]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete c[s.id]}}}};var w,b=(w=[],function(t,e){return w[t]=e,w.filter(Boolean).join("\n")});function x(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=b(e,o);else{var i=document.createTextNode(o),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(i,c[e]):t.appendChild(i)}}},function(t,e,n){var r=n(4).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(0)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e,n){"use strict";function r(t){var e=l(t,!1);if("string"==typeof e&&2<e.length){var n,r,o,i=(e=g?e.trim():h(e,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var c,s=e.slice(2),a=0,u=s.length;a<u;a++)if((c=s.charCodeAt(a))<48||o<c)return NaN;return parseInt(s,r)}}return+e}var o=n(1),i=n(7),c=n(16),s=n(32),l=n(10),a=n(6),u=n(37).f,f=n(18).f,p=n(4).f,h=n(42).trim,d="Number",v=o[d],m=v,y=v.prototype,S=c(n(46)(y))==d,g="trim"in String.prototype;if(!v(" 0o1")||!v("0b1")||v("+0x1")){v=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof v&&(S?a(function(){y.valueOf.call(n)}):c(n)!=d)?s(new m(r(e)),n,v):r(e)};for(var w,b=n(0)?u(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;b.length>x;x++)i(m,w=b[x])&&!i(v,w)&&p(v,w,f(m,w));(v.prototype=y).constructor=v,n(27)(o,d,v)}},function(t,e,n){var r=n(2),o=n(33).set;t.exports=function(t,e,n){var i,c=e.constructor;return c!==n&&"function"==typeof c&&(i=c.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},function(t,e,n){function r(t,e){if(i(t),!o(e)&&null!==e)throw TypeError(e+": can't set as prototype!")}var o=n(2),i=n(5);t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,o){try{(o=n(17)(Function.call,n(18).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return r(t,n),e?t.__proto__=n:o(t,n),t}}({},!1):void 0),check:r}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(16);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(21),o=n(13).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(11),o=n(39),i=n(40);t.exports=function(t){return function(e,n,c){var s,l=r(e),a=o(l.length),u=i(c,a);if(t&&n!=n){for(;u<a;)if((s=l[u++])!=s)return!0}else for(;u<a;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}}},function(t,e,n){var r=n(22),o=Math.min;t.exports=function(t){return 0<t?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(22),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e){t.exports=!1},function(t,e,n){function r(t,e,n){var r={},i=c(function(){return!!s[t]()||"
"!="
"[t]()}),l=r[t]=i?e(f):s[t];n&&(r[n]=l),o(o.P+o.F*i,"String",r)}var o=n(43),i=n(20),c=n(6),s=n(45),l="["+s+"]",a=RegExp("^"+l+l+"*"),u=RegExp(l+l+"*$"),f=r.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(a,"")),2&e&&(t=t.replace(u,"")),t};t.exports=r},function(t,e,n){var r=n(1),o=n(12),i=n(26),c=n(27),s=n(17),l="prototype",a=function(t,e,n){var u,f,p,h,d=t&a.F,v=t&a.G,m=t&a.S,y=t&a.P,S=t&a.B,g=v?r:m?r[e]||(r[e]={}):(r[e]||{})[l],w=v?o:o[e]||(o[e]={}),b=w[l]||(w[l]={});for(u in v&&(n=e),n)p=((f=!d&&g&&void 0!==g[u])?g:n)[u],h=S&&f?s(p,r):y&&"function"==typeof p?s(Function.call,p):p,g&&c(g,u,p,t&a.U),w[u]!=p&&i(w,u,h),y&&b[u]!=p&&(b[u]=p)};r.core=o,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){t.exports=n(24)("native-function-to-string",Function.toString)},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,n){function r(){}var o=n(5),i=n(47),c=n(13),s=n(23)("IE_PROTO"),l="prototype",a=function(){var t,e=n(15)("iframe"),r=c.length;for(e.style.display="none",n(49).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),a=t.F;r--;)delete a[l][c[r]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(r[l]=o(t),n=new r,r[l]=null,n[s]=t):n=a(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(4),o=n(5),i=n(48);t.exports=n(0)?Object.defineProperties:function(t,e){o(t);for(var n,c=i(e),s=c.length,l=0;l<s;)r.f(t,n=c[l++],e[n]);return t}},function(t,e,n){var r=n(21),o=n(13);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(1).document;t.exports=r&&r.documentElement},function(t,e,n){"use strict";var r=n(8);n.n(r).a},function(t,e,n){(t.exports=n(28)(!1)).push([t.i,".has-header-wrapper[data-v-1df406bd] {\n height: 100vh;\n overflow: hidden;\n}\n.vue-horizontal-wrapper[data-v-1df406bd] {\n width: 100%;\n overflow: hidden;\n}\n.vue-horizontal-wrapper .vue-horizontal[data-v-1df406bd] {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n",""])},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var o,i=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},function(t,e,n){"use strict";var r=n(9);n.n(r).a},function(t,e,n){(t.exports=n(28)(!1)).push([t.i,".vue-vertical-wrapper[data-v-317d1562] {\n width: 100vw;\n position: relative;\n height: 100%;\n}\n.vue-vertical-wrapper .vue-vertical[data-v-317d1562] {\n min-height: calc(100% + 1px);\n}\n.vue-vertical-wrapper .refresh-status-bar[data-v-317d1562] {\n position: absolute;\n width: 100%;\n color: #7e8c8d;\n text-align: center;\n top: -12px;\n}\n",""])},function(t,e,n){"use strict";function r(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"wrapper-scroll",staticClass:"vue-main-scroll-wrapper",class:{"has-header-wrapper":t.$slots.header}},[n("div",{staticClass:"vue-main-scroll",on:{touchstart:t.moveStart,touchmove:t.moveScroll,touchend:t.moveEnd}},[t._t("header"),n("div",{ref:"vue-horizontal-wrapper",staticClass:"vue-horizontal-wrapper"},[n("div",{ref:"vue-horizontal",staticClass:"vue-horizontal",style:{height:t.defaultHeight,width:t.horizontalWidth}},[t._t("default")],2)])],2)])}n.r(e),n(30),r._withStripped=!0,n(31);var o=n(3),i=n.n(o),c={name:"vue-horizontal-scroll",props:{options:{type:Object,default:function(){return{}}},free:{type:Boolean,default:!1},height:{type:String,default:""},offsetY:{type:String||Number,default:"0"},lock:{type:Boolean,default:!1}},data:function(){return{startY:0,wrapperScrollStartY:0,moveY:0,currentPageScrollY:0,BScroll:null,currentIdx:0,inited:!1,defaultHeight:"100vh",horizontalWidth:"100vw",horizontalScrollDefaultOpt:{scrollX:!0,scrollY:!1,momentum:!1,bounce:!0,eventPassthrough:"vertical",click:!1,snap:{loop:!1,stepX:0,threshold:.2}},wrapperScroll:null}},methods:{moveStart:function(t){this.startY=t.touches[0].clientY,this.wrapperScroll&&(this.wrapperScrollStartY=this.wrapperScroll.y)},moveScroll:function(t){var e=t.touches[0].clientY-this.startY;if(this.wrapperScroll){if(0===this.wrapperScroll.y&&0<e)return;if(this.wrapperScroll.y===this.wrapperScroll.maxScrollY&&e<0)return;this.wrapperScroll.scrollTo(0,this.wrapperScrollStartY+e)}},moveEnd:function(){},computedHeight:function(){var t=this.$refs["wrapper-scroll"].offsetTop;if(this.$slots.header)"number"==typeof this.offsetY?this.defaultHeight=window.screen.height+t+this.offsetY:this.defaultHeight="calc(100vh + ".concat(t,"px + ").concat(this.offsetY,")");else{var e=window.screen.height,n=t||0;this.defaultHeight=e-n+"px",this.inited=!0}},computedWidth:function(){this.horizontalWidth=this.$refs["vue-horizontal"].children.length+"00vw"},goToPage:function(t){this.BScroll.goToPage(t,0)},initWrapperScroll:function(){var t=this;this.wrapperScroll=new i.a(this.$refs["wrapper-scroll"],{click:!1,scrollY:!0,bounce:!1,probeType:3,eventPassthrough:"horizontal"}),this.$nextTick(function(){t.wrapperScroll.disable()})},initBScroll:function(){var t=this;if(!this.$slots.default)throw"至少拥有一个列表";if(1<this.$slots.default.length){var e=Object.assign(this.horizontalScrollDefaultOpt,this.options);this.BScroll=new i.a(this.$refs["vue-horizontal-wrapper"],e),this.BScroll.on("scrollEnd",function(){t.currentIdx=t.BScroll.getCurrentPage().pageX,t.$emit("scrollEnd",t.currentIdx,t.BScroll),t.$nextTick(function(){t.computedHeight()})}),this.computedWidth()}this.$slots.header&&this.initWrapperScroll(),this.listenMovingDirectionY(),this.$nextTick(function(){t.BScroll&&t.BScroll.refresh()})},listenMovingByFree:function(t){this.currentPageScrollY=t.componentInstance&&t.componentInstance.BScroll.y||0},listenMovingByDirection:function(t){this.lock?1===t.componentInstance.BScroll.movingDirectionY?(this.wrapperScroll&&this.wrapperScroll.scrollTo(0,this.wrapperScroll.maxScrollY,300,"ease"),this.$emit("directionYChange",1)):-1===t.componentInstance.BScroll.movingDirectionY&&0<=t.componentInstance.BScroll.y&&(this.wrapperScroll&&this.wrapperScroll.scrollTo(0,0,300,"ease"),this.$emit("directionYChange",-1)):1===t.componentInstance.BScroll.movingDirectionY?(this.$emit("directionYChange",1),this.wrapperScroll&&this.wrapperScroll.scrollTo(0,this.wrapperScroll.maxScrollY,300,"ease")):(this.$emit("directionYChange",-1),this.wrapperScroll&&this.wrapperScroll.scrollTo(0,0,300,"ease"))},listenMovingDirectionY:function(){var t=this;this.$slots.header&&this.$slots.default.map(function(e){if(!e.componentInstance||!e.componentInstance.BScroll)throw"暂未找到子组件的BScroll组件,如果为动态加载,需要在加载后再次调用initBScroll";e.componentInstance.BScroll.on("scroll",function(){t.free?t.listenMovingByFree(e):t.listenMovingByDirection(e)})})},preventDefault:function(t){t.preventDefault()},lockTouchMoveEvent:function(){document.body.addEventListener("touchmove",this.preventDefault,{passive:!1})}},mounted:function(){this.height?this.computedHeight():this.defaultHeight=this.height,this.initBScroll(),this.lockTouchMoveEvent()}};function s(t,e,n,r,o,i,c,s){var l,a="function"==typeof t?t.options:t;if(e&&(a.render=e,a.staticRenderFns=n,a._compiled=!0),r&&(a.functional=!0),i&&(a._scopeId="data-v-"+i),c?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},a._ssrRegister=l):o&&(l=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(a.functional){a._injectStyles=l;var u=a.render;a.render=function(t,e){return l.call(e),u(t,e)}}else{var f=a.beforeCreate;a.beforeCreate=f?[].concat(f,l):[l]}return{exports:t,options:a}}n(50);var l=s(c,r,[],!1,null,"1df406bd",null);function a(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"vue-vertical-wrapper",staticClass:"vue-vertical-wrapper"},[n("div",{staticClass:"vue-vertical"},[t.options.pullDownRefresh?n("div",{staticClass:"refresh-status-bar",style:{top:t.refreshStatusBarY}},[t._t("refresh-status-bar",[t._v(t._s(t.pullDownStatus))])],2):t._e(),t._t("default")],2)])}l.options.__file="src/horizontal.vue";var u=l.exports;a._withStripped=!0;var f={name:"vue-vertical-scroll",props:{options:{type:Object,default:function(){return{}}},pullDownStatusKeyOpt:{type:Object,default:function(){return{"下拉刷新":"下拉刷新...","释放刷新":"释放刷新...","正在载入":"正在载入..."}}},refreshStatusBarY:{type:String,default:"-12px"}},data:function(){return{BScroll:null,verticalScrollDefaultOpt:{click:!1,scrollY:!0,bounce:!0,eventPassthrough:"horizontal",probeType:3,pullUpLoad:50},pullDownStatus:this.pullDownStatusKeyOpt["下拉刷新"]}},methods:{autoPullDownRefresh:function(){var t=this,e=0;try{e=this.options.pullDownRefresh.threshold||50}catch(t){e=50}this.BScroll.scrollTo(0,e,300),setTimeout(function(){t.BScroll.autoPullDownRefresh()},300)},initBScroll:function(){var t=this,e=Object.assign(this.verticalScrollDefaultOpt,this.options);this.BScroll=new i.a(this.$refs["vue-vertical-wrapper"],e);var n=this.BScroll.options.pullDownRefresh.stop;this.BScroll.on("beforeScrollStart",function(){t.$emit("touchStart"),t.$emit("beforeScrollStart")}),this.BScroll.on("touchEnd",function(){t.$emit("touchEnd")}),this.BScroll.on("scroll",function(){t.BScroll.y===n&&(t.pullDownStatus=t.pullDownStatusKeyOpt["正在载入"],t.$emit("pullDownStatusChange","正在载入")),t.BScroll.y<n&&(t.pullDownStatus=t.pullDownStatusKeyOpt["下拉刷新"],t.$emit("pullDownStatusChange","下拉刷新")),t.BScroll.y>n&&(t.pullDownStatus=t.pullDownStatusKeyOpt["释放刷新"],t.$emit("pullDownStatusChange","释放刷新")),t.$emit("scroll",t.BScroll.y)}),this.BScroll.on("pullingUp",function(){t.$emit("pullingUp",t.BScroll)}),this.BScroll.on("scrollEnd",function(){t.$emit("scrollEnd")}),this.BScroll.on("pullingDown",function(){t.$emit("pullingDown",t.BScroll)}),this.$nextTick(function(){t.$emit("inited")})}},mounted:function(){this.initBScroll()}},p=(n(53),s(f,a,[],!1,null,"317d1562",null));p.options.__file="src/vertical.vue";var h=p.exports;function d(t){t.component(u.name,u),t.component(h.name,h)}"undefined"!=typeof window&&window.Vue&&d(window.Vue),e.default={install:d}}],e.c=r,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(e){return t[e]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=55);function e(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n,r});