@xysfe/actui
Version:
A fantastic mobile ui lib implement by Vue
1 lines • 9.38 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@xysfe/actui/es/BScroll/index.js"),require("@xysfe/actui/es/assets/utils/BScroll/constants.js")):"function"==typeof define&&define.amd?define(["@xysfe/actui/es/BScroll/index.js","@xysfe/actui/es/assets/utils/BScroll/constants.js"],t):"object"==typeof exports?exports["assets/common/scroll.js"]=t(require("@xysfe/actui/es/BScroll/index.js"),require("@xysfe/actui/es/assets/utils/BScroll/constants.js")):e["assets/common/scroll.js"]=t(e["@xysfe/actui/es/BScroll/index.js"],e["@xysfe/actui/es/assets/utils/BScroll/constants.js"])}("undefined"!=typeof self?self:this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="../es",t(t.s=942)}({191:function(t,n){t.exports=e},192:function(e,n){e.exports=t},35:function(e,t){function n(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var s=r(o);return[n].concat(o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"})).concat([s]).join("\n")}return[n].join("\n")}function r(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var s=this[o][0];"number"==typeof s&&(r[s]=!0)}for(o=0;o<e.length;o++){var l=e[o];"number"==typeof l[0]&&r[l[0]]||(n&&!l[2]?l[2]=n:n&&(l[2]="("+l[2]+") and ("+n+")"),t.push(l))}},t}},36:function(e,t,n){"use strict";function r(e,t,n,r){m=n,y=r||{};var s=Object(c.a)(e,t);return o(s),function(t){for(var n=[],r=0;r<s.length;r++){var l=s[r],i=f[l.id];i.refs--,n.push(i)}t?(s=Object(c.a)(e,t),o(s)):s=[];for(var r=0;r<n.length;r++){var i=n[r];if(0===i.refs){for(var a=0;a<i.parts.length;a++)i.parts[a]();delete f[i.id]}}}}function o(e){for(var t=0;t<e.length;t++){var n=e[t],r=f[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(l(n.parts[o]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{for(var s=[],o=0;o<n.parts.length;o++)s.push(l(n.parts[o]));f[n.id]={id:n.id,refs:1,parts:s}}}}function s(){var e=document.createElement("style");return e.type="text/css",d.appendChild(e),e}function l(e){var t,n,r=document.querySelector("style["+b+'~="'+e.id+'"]');if(r){if(m)return v;r.parentNode.removeChild(r)}if(S){var o=h++;r=p||(p=s()),t=i.bind(null,r,o,!1),n=i.bind(null,r,o,!0)}else r=s(),t=a.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}function i(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=g(t,o);else{var s=document.createTextNode(o),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(s,l[t]):e.appendChild(s)}}function a(e,t){var n=t.css,r=t.media,o=t.sourceMap;if(r&&e.setAttribute("media",r),y.ssrId&&e.setAttribute(b,t.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var c=n(40),u="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!u)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 f={},d=u&&(document.head||document.getElementsByTagName("head")[0]),p=null,h=0,m=!1,v=function(){},y=null,b="data-vue-ssr-id",S="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase()),g=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},40:function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},o=0;o<t.length;o++){var s=t[o],l=s[0],i=s[1],a=s[2],c=s[3],u={id:e+":"+o,css:i,media:a,sourceMap:c};r[l]?r[l].parts.push(u):n.push(r[l]={id:l,parts:[u]})}return n}t.a=r},686:function(e,t,n){"use strict";var r=n(191),o=n.n(r),s=n(192);n.n(s);t.a={name:"ActScroll",props:{probeType:{type:Number,default:2},click:{type:Boolean,default:!0},listenScrollInit:{type:Boolean,default:!1},listenScroll:{type:Boolean,default:!1},listenBeforeScroll:{type:Boolean,default:!1},listenScrollEnd:{type:Boolean,default:!1},listenZoomEnd:{type:Boolean,default:!1},listenPullingUp:{type:Boolean,default:!1},direction:{type:String,default:"vertical"},scrollbar:{type:null,default:!1},startY:{type:Number,default:0},refreshDelay:{type:Number,default:20},freeScroll:{type:Boolean,default:!1},mouseWheel:{type:Boolean,default:!1},bounce:{type:[Boolean,Object],default:!0},zoom:{type:Boolean,default:!1},useTransition:{type:Boolean,default:!0}},data:function(){return{beforePullDown:!0,isRebounding:!1,pullUpDirty:!0,pullDownStyle:"",bubbleY:0,lastTouchStart:null,fingers:0,tapTarget:null,isDouble:!1,startXd:0,startYd:0,endXd:0,endYd:0}},mounted:function(){var e=this;this.$nextTick(function(){e.initScroll()})},destroyed:function(){this.scroll&&this.scroll.destroy(),this.$emit("destroyed",this.scroll)},methods:{initScroll:function(){var e=this;if(this.$refs.wrapper){var t={probeType:this.probeType,click:this.click,scrollY:this.freeScroll||"vertical"===this.direction,scrollX:this.freeScroll||"horizontal"===this.direction,scrollbar:this.scrollbar,startY:this.startY,freeScroll:this.freeScroll,mouseWheel:this.mouseWheel,bounce:this.bounce,zoom:this.zoom,bounceTime:300,useTransition:s.USE_TRANSITION&&this.useTransition,pullUpLoad:{threshold:50}};this.scroll=new o.a(this.$refs.wrapper,t),this.listenScroll&&this.scroll.on("scroll",function(t){e.$emit("scroll",t)}),this.listenScrollEnd&&this.scroll.on("scrollEnd",function(t){e.$emit("scroll-end",t)}),this.listenBeforeScroll&&(this.scroll.on("beforeScrollStart",function(){e.$emit("beforeScrollStart")}),this.scroll.on("scrollStart",function(){e.$emit("scroll-start")})),this.listenZoomEnd&&this.scroll.on("zoomEnd",function(){e.$emit("zoomEnd",e.scroll)}),this.zoom&&(this.isDouble=!0),this.listenScrollInit&&this.$emit("scrollSuc",this.scroll),this.listenPullingUp&&this.scroll.on("pullingUp",function(){e.$emit("pullingUp")})}},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(e,t){this.$emit("click",t)},destroy:function(){this.scroll.destroy()},forceUpdate:function(e){this.refresh()}}}},8:function(e,t,n){"use strict";function r(e,t,n,r,o,s,l,i){e=e||{};var a=typeof e.default;"object"!==a&&"function"!==a||(e=e.default);var c="function"==typeof e?e.options:e;t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),s&&(c._scopeId=s);var u;if(l?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(l)},c._ssrRegister=u):o&&(u=i?function(){o.call(this,this.$root.$options.shadowRoot)}:o),u)if(c.functional){c._injectStyles=u;var f=c.render;c.render=function(e,t){return u.call(t),f(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,u):[u]}return{exports:e,options:c}}t.a=r},942:function(e,t,n){"use strict";function r(e){i||n(943)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(686),s=n(945),l=n(8),i=!1,a=r,c=Object(l.a)(o.a,s.a,s.b,!1,a,"data-v-3349a91e",null);c.options.__file="src\\components\\common\\scroll.vue",t.default=c.exports},943:function(e,t,n){var r=n(944);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var o=n(36).default;o("2d14d01a",r,!1,{})},944:function(e,t,n){t=e.exports=n(35)(!1),t.push([e.i,"\n[data-v-3349a91e] .bscroll-vertical-scrollbar{width:5px !important\n}\n[data-v-3349a91e] .bscroll-indicator{background:rgba(0,0,0,0.2) !important\n}\n.scroll-wrapper[data-v-3349a91e]{position:relative;height:100%;-webkit-transform:translateZ(0);transform:translateZ(0);overflow:hidden\n}\n.scroll-wrapper .scroll-content[data-v-3349a91e]{width:100%;position:relative;z-index:1\n}\n",""])},945:function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return o});var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"wrapper",staticClass:"scroll-wrapper"},[n("div",{staticClass:"scroll-content"},[e._t("default")],2)])},o=[];r._withStripped=!0}})});