w-ui
Version:
A Vue.js 2.0 UI Toolkit for mobile
1 lines • 12.1 kB
JavaScript
module.exports=function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},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="",t(t.s=37)}({0:function(e,t){e.exports=function(e,t,n,o,r,i){var s,a=e=e||{},u=typeof e.default;"object"!==u&&"function"!==u||(s=e,a=e.default);var c="function"==typeof a?a.options:a;t&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId=r);var l;if(i?(l=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(i)},c._ssrRegister=l):o&&(l=o),l){var f=c.functional,p=f?c.render:c.beforeCreate;f?(c._injectStyles=l,c.render=function(e,t){return l.call(t),p(e,t)}):c.beforeCreate=p?[].concat(p,l):[l]}return{esModule:s,exports:a,options:c}}},1:function(e,t,n){"use strict";function o(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var i=r(o);return[n].concat(o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"})).concat([i]).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 n=o(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(o[i]=!0)}for(r=0;r<e.length;r++){var s=e[r];"number"==typeof s[0]&&o[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},2:function(e,t,n){function o(e){for(var t=0;t<e.length;t++){var n=e[t],o=l[n.id];if(o){o.refs++;for(var r=0;r<o.parts.length;r++)o.parts[r](n.parts[r]);for(;r<n.parts.length;r++)o.parts.push(i(n.parts[r]));o.parts.length>n.parts.length&&(o.parts.length=n.parts.length)}else{for(var s=[],r=0;r<n.parts.length;r++)s.push(i(n.parts[r]));l[n.id]={id:n.id,refs:1,parts:s}}}}function r(){var e=document.createElement("style");return e.type="text/css",f.appendChild(e),e}function i(e){var t,n,o=document.querySelector("style["+g+'~="'+e.id+'"]');if(o){if(v)return m;o.parentNode.removeChild(o)}if(y){var i=d++;o=p||(p=r()),t=s.bind(null,o,i,!1),n=s.bind(null,o,i,!0)}else o=r(),t=a.bind(null,o),n=function(){o.parentNode.removeChild(o)};return t(e),function(o){if(o){if(o.css===e.css&&o.media===e.media&&o.sourceMap===e.sourceMap)return;t(e=o)}else n()}}function s(e,t,n,o){var r=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=w(t,r);else{var i=document.createTextNode(r),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}function a(e,t){var n=t.css,o=t.media,r=t.sourceMap;if(o&&e.setAttribute("media",o),h.ssrId&&e.setAttribute(g,t.id),r&&(n+="\n/*# sourceURL="+r.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var 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 c=n(3),l={},f=u&&(document.head||document.getElementsByTagName("head")[0]),p=null,d=0,v=!1,m=function(){},h=null,g="data-vue-ssr-id",y="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,n,r){v=n,h=r||{};var i=c(e,t);return o(i),function(t){for(var n=[],r=0;r<i.length;r++){var s=i[r],a=l[s.id];a.refs--,n.push(a)}t?(i=c(e,t),o(i)):i=[];for(var r=0;r<n.length;r++){var a=n[r];if(0===a.refs){for(var u=0;u<a.parts.length;u++)a.parts[u]();delete l[a.id]}}}};var w=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},3:function(e,t,n){"use strict";e.exports=function(e,t){for(var n=[],o={},r=0;r<t.length;r++){var i=t[r],s=i[0],a=i[1],u=i[2],c=i[3],l={id:e+":"+r,css:a,media:u,sourceMap:c};o[s]?o[s].parts.push(l):n.push(o[s]={id:s,parts:[l]})}return n}},37:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Popup=void 0;var o=n(38),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.Popup=r.default},38:function(e,t,n){"use strict";function o(e){u||n(39)}Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n.n(r);for(var s in r)"default"!==s&&function(e){n.d(t,e,function(){return r[e]})}(s);var a=n(41),u=!1,c=n(0),l=o,f=c(i.a,a.a,!1,l,null,null);f.options.__file="packages/popup/src/popup.vue",t.default=f.exports},39:function(e,t,n){var o=n(40);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);n(2)("5fab9c30",o,!1,{})},4:function(e,t){e.exports=require("vue")},40:function(e,t,n){t=e.exports=n(1)(!1),t.push([e.i,"\n.wui-popup {\n position: fixed;\n z-index: 998;\n bottom: 0;\n right: 0;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n}\n.wui-popup .mask-popup {\n background-color: rgba(0, 0, 0, .4);\n position: fixed;\n z-index: 999;\n bottom: 0;\n right: 0;\n left: 0;\n top: 0;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.wui-popup .popup-header {\n height: 45px;\n padding: 0px;\n background: #fff;\n z-index: 2;\n position: relative;\n -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .1);\n box-shadow: 0 0 5px rgba(0, 0, 0, .1);\n}\n.wui-popup .popup-header .btn-confirm {\n position: absolute;\n right: 0;\n}\n.wui-popup .popup-container {\n text-align: center;\n position: fixed;\n bottom: 0;\n left: 0;\n width: 100%;\n max-height: 80%;\n overflow: auto;\n z-index: 1000;\n background-color: #EFEFF4;\n -webkit-transition: -webkit-transform .3s;\n transition: -webkit-transform .3s;\n transition: transform .3s;\n transition: transform .3s, -webkit-transform .3s;\n}\n",""])},41:function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.value?n("div",{staticClass:"wui-popup"},[n("div",{staticClass:"mask-popup",on:{click:function(t){return t.stopPropagation(),e.close(t)}}}),e._v(" "),n("div",{staticClass:"popup-container"},[e._t("default")],2)]):e._e()},r=[];o._withStripped=!0;var i={render:o,staticRenderFns:r};t.a=i},5:function(e,t,n){"use strict";function o(e,t){if(!e||!t)return!1;if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}function r(e,t){if(e){for(var n=e.className,r=(t||"").split(" "),i=0,s=r.length;i<s;i++){var a=r[i];a&&(e.classList?e.classList.add(a):o(e,a)||(n+=" "+a))}e.classList||(e.className=n)}}function i(e,t){if(e&&t){for(var n=t.split(" "),r=" "+e.className+" ",i=0,s=n.length;i<s;i++){var a=n[i];a&&(e.classList?e.classList.remove(a):o(e,a)&&(r=r.replace(" "+a+" "," ")))}e.classList||(e.className=w(r))}}function s(e,t,n){if(e&&t)if("object"===(void 0===t?"undefined":f(t)))for(var o in t)t.hasOwnProperty(o)&&s(e,o,t[o]);else t=b(t),"opacity"===t&&g<9?e.style.filter=isNaN(n)?"":"alpha(opacity="+100*n+")":e.style[t]=n}function a(e){for(var t=e;t&&"HTML"!==t.tagName&&"BODY"!==t.tagName&&1===t.nodeType;){var n=document.defaultView.getComputedStyle(t).overflowY;if("scroll"===n||"auto"===n)return t;t=t.parentNode}return window}function u(e,t){var n=e==window?document.body.offsetHeight:e.offsetHeight,o=e===window?0:e.getBoundingClientRect().top,r=t.getBoundingClientRect().top-o,i=r+t.offsetHeight;return r>=0&&r<n||i>0&&i<=n}function c(e){function t(n,o,r){if(n!==o){var i=n+r>o?o:n+r;n>o&&(i=n-r<o?o:n-r),e===window?window.scrollTo(i,i):e.scrollTop=i,window.requestAnimationFrame(function(){return t(i,o,r)})}}var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500;window.requestAnimationFrame||(window.requestAnimationFrame=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)});var i=Math.abs(n-o);t(n,o,Math.ceil(i/r*50))}function l(){return++y}Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=t.isArray=t.isDate=t.isFunction=t.isNumber=t.isString=t.isBoolean=t.pageScroll=t.isIOS=t.getStyle=t.once=t.off=t.on=void 0;var f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.hasClass=o,t.addClass=r,t.removeClass=i,t.setStyle=s,t.getScrollview=a,t.checkInview=u,t.scrollTop=c,t.getZIndex=l;var p=n(4),d=function(e){return e&&e.__esModule?e:{default:e}}(p),v=d.default.prototype.$isServer,m=/([\:\-\_]+(.))/g,h=/^moz([A-Z])/,g=v?0:Number(document.documentMode),y=1e4,w=function(e){return(e||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},b=function(e){return e.replace(m,function(e,t,n,o){return o?n.toUpperCase():n}).replace(h,"Moz$1")},x=t.on=function(){return!v&&document.addEventListener?function(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}:function(e,t,n){e&&t&&n&&e.attachEvent("on"+t,n)}}(),S=t.off=function(){return!v&&document.removeEventListener?function(e,t,n){e&&t&&e.removeEventListener(t,n,!1)}:function(e,t,n){e&&t&&e.detachEvent("on"+t,n)}}();t.once=function(e,t,n){x(e,t,function o(){n&&n.apply(this,arguments),S(e,t,o)})},t.getStyle=g<9?function(e,t){if(!v){if(!e||!t)return null;t=b(t),"float"===t&&(t="styleFloat");try{switch(t){case"opacity":try{return e.filters.item("alpha").opacity/100}catch(e){return 1}default:return e.style[t]||e.currentStyle?e.currentStyle[t]:null}}catch(n){return e.style[t]}}}:function(e,t){if(!v){if(!e||!t)return null;t=b(t),"float"===t&&(t="cssFloat");try{var n=document.defaultView.getComputedStyle(e,"");return e.style[t]||n?n[t]:null}catch(n){return e.style[t]}}},t.isIOS=!!(window.navigator&&window.navigator.userAgent||"").match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),t.pageScroll=function(){var e=function(e){e.preventDefault(),e.stopPropagation()},t=!1;return{lock:function(n){t||(t=!0,(n||document).addEventListener("touchmove",e))},unlock:function(n){t=!1,(n||document).removeEventListener("touchmove",e)}}}(),t.isBoolean=function(e){return"boolean"==typeof e},t.isString=function(e){return"string"==typeof e},t.isNumber=function(e){return"number"==typeof e},t.isFunction=function(e){return"function"==typeof e},t.isDate=function(e){return"date"===Object.prototype.toString.call(e).match(/^(\[object )(\w+)\]$/i)[2].toLowerCase()},t.isArray=Array.isArray,t.isObject=function(e){return"object"===(void 0===e?"undefined":f(e))}},7:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5);t.default={name:"w-popup",props:{value:{type:Boolean,default:!1}},watch:{value:function(e){e&&this.isIOS&&(0,o.addClass)(this.scrollView,"g-fix-ios-overflow-scrolling-bug"),this.show=e}},methods:{close:function(){this.isIOS&&(0,o.removeClass)(this.scrollView,"g-fix-ios-overflow-scrolling-bug"),this.$emit("input",!1)}},destroyed:function(){this.close()},mounted:function(){this.scrollView=(0,o.getScrollview)(this.$el),this.isIOS=!!(window.navigator&&window.navigator.userAgent||"").match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)}}}});