w-ui
Version:
A Vue.js 2.0 UI Toolkit for mobile
1 lines • 9.66 kB
JavaScript
module.exports=function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},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=245)}({0:function(t,e){t.exports=function(t,e,n,o,r,i){var s,u=t=t||{},p=typeof t.default;"object"!==p&&"function"!==p||(s=t,u=t.default);var a="function"==typeof u?u.options:u;e&&(a.render=e.render,a.staticRenderFns=e.staticRenderFns,a._compiled=!0),n&&(a.functional=!0),r&&(a._scopeId=r);var c;if(i?(c=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__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},a._ssrRegister=c):o&&(c=o),c){var l=a.functional,d=l?a.render:a.beforeCreate;l?(a._injectStyles=c,a.render=function(t,e){return c.call(e),d(t,e)}):a.beforeCreate=d?[].concat(d,c):[c]}return{esModule:s,exports:u,options:a}}},1:function(t,e,n){"use strict";function o(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"==typeof btoa){var i=r(o);return[n].concat(o.sources.map(function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"})).concat([i]).join("\n")}return[n].join("\n")}function r(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=o(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(o[i]=!0)}for(r=0;r<t.length;r++){var s=t[r];"number"==typeof s[0]&&o[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),e.push(s))}},e}},2:function(t,e,n){function o(t){for(var e=0;e<t.length;e++){var n=t[e],o=c[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]));c[n.id]={id:n.id,refs:1,parts:s}}}}function r(){var t=document.createElement("style");return t.type="text/css",l.appendChild(t),t}function i(t){var e,n,o=document.querySelector("style["+x+'~="'+t.id+'"]');if(o){if(m)return h;o.parentNode.removeChild(o)}if(w){var i=f++;o=d||(d=r()),e=s.bind(null,o,i,!1),n=s.bind(null,o,i,!0)}else o=r(),e=u.bind(null,o),n=function(){o.parentNode.removeChild(o)};return e(t),function(o){if(o){if(o.css===t.css&&o.media===t.media&&o.sourceMap===t.sourceMap)return;e(t=o)}else n()}}function s(t,e,n,o){var r=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=v(e,r);else{var i=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(i,s[e]):t.appendChild(i)}}function u(t,e){var n=e.css,o=e.media,r=e.sourceMap;if(o&&t.setAttribute("media",o),b.ssrId&&t.setAttribute(x,e.id),r&&(n+="\n/*# sourceURL="+r.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var p="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!p)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var a=n(3),c={},l=p&&(document.head||document.getElementsByTagName("head")[0]),d=null,f=0,m=!1,h=function(){},b=null,x="data-vue-ssr-id",w="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,e,n,r){m=n,b=r||{};var i=a(t,e);return o(i),function(e){for(var n=[],r=0;r<i.length;r++){var s=i[r],u=c[s.id];u.refs--,n.push(u)}e?(i=a(t,e),o(i)):i=[];for(var r=0;r<n.length;r++){var u=n[r];if(0===u.refs){for(var p=0;p<u.parts.length;p++)u.parts[p]();delete c[u.id]}}}};var v=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},245:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Step=void 0;var o=n(246),r=function(t){return t&&t.__esModule?t:{default:t}}(o);e.Step=r.default},246:function(t,e,n){"use strict";function o(t){p||n(247)}Object.defineProperty(e,"__esModule",{value:!0});var r=n(50),i=n.n(r);for(var s in r)"default"!==s&&function(t){n.d(e,t,function(){return r[t]})}(s);var u=n(249),p=!1,a=n(0),c=o,l=a(i.a,u.a,!1,c,null,null);l.options.__file="packages/step/src/step.vue",e.default=l.exports},247:function(t,e,n){var o=n(248);"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);n(2)("73b25f8a",o,!1,{})},248:function(t,e,n){e=t.exports=n(1)(!1),e.push([t.i,"\n.wui-step {\n font-size: 13px;\n}\n.wui-step-content {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n}\n.wui-step-item {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n position: relative;\n}\n.wui-step-item:not(:first-child):before {\n content: '';\n height: 2px;\n position: absolute;\n top: -1px;\n background-color: #CCC;\n}\n.wui-step-item > em {\n border-radius: 50%;\n position: absolute;\n top: 50%;\n left: 50%;\n background-color: #CCC;\n}\n.wui-step-item-top,\n.wui-step-item-bottom {\n position: absolute;\n left: 0;\n text-align: center;\n white-space: nowrap;\n text-overflow: ellipsis;\n width: 100%;\n padding: 0 4px;\n}\n.wui-step-item-top-text > span {\n color: #989898;\n}\n.wui-step-item-bottom {\n color: #333;\n}\n.wui-step-theme-bottom .wui-step-content {\n padding: 10px 0 42px 0;\n}\n.wui-step-theme-bottom .wui-step-item:not(:first-child):before {\n width: 70%;\n left: -35%;\n}\n.wui-step-theme-bottom .wui-step-item > em {\n width: 20px;\n height: 20px;\n margin-left: -10px;\n margin-top: -10px;\n text-align: center;\n line-height: 20px;\n font-size: 12px;\n}\n.wui-step-theme-bottom .wui-step-item > em > i {\n color: #FFF;\n}\n.wui-step-theme-bottom .wui-step-item-top {\n bottom: 18px;\n}\n.wui-step-theme-bottom .wui-step-item-bottom {\n top: 18px;\n}\n.wui-step-theme-bottom .wui-step-item-current:before {\n background-color: #20a0ff;\n}\n.wui-step-theme-bottom .wui-step-item-current > em {\n background-color: #20a0ff;\n}\n.wui-step-theme-bottom .wui-step-item-current > em.wui-step-checkmark:after {\n content: '';\n position: absolute;\n top: 4px;\n left: 8px;\n border: 1px solid #FFF;\n border-top: 0;\n border-left: 0;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n width: 5px;\n height: 10px;\n}\n.wui-step-theme-bottom .wui-step-item-current .wui-step-item-bottom {\n color: #20a0ff;\n}\n.wui-step-theme-top .wui-step-content {\n padding: 42px 0;\n}\n.wui-step-theme-top .wui-step-item:not(:first-child):before {\n width: 80%;\n left: -40%;\n}\n.wui-step-theme-top .wui-step-item > em {\n width: 10px;\n height: 10px;\n margin-left: -5px;\n margin-top: -5px;\n}\n.wui-step-theme-top .wui-step-item-top {\n bottom: 15px;\n}\n.wui-step-theme-top .wui-step-item-bottom {\n top: 15px;\n}\n.wui-step-theme-top .wui-step-item-current .wui-step-item-top-text {\n display: inline-block;\n background-color: #20a0ff;\n padding: 5px 11px 3px;\n border-radius: 100px;\n position: relative;\n z-index: 1;\n}\n.wui-step-theme-top .wui-step-item-current .wui-step-item-top-text > span {\n color: #FFF;\n}\n.wui-step-theme-top .wui-step-item-current > em {\n background-color: #20a0ff;\n}\n.wui-step-theme-top .wui-step-item-current > em:after {\n content: '';\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #20a0ff;\n position: absolute;\n top: -10px;\n left: 50%;\n margin-left: -6px;\n}\n",""])},249:function(t,e,n){"use strict";var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"wui-step",class:"wui-step-theme-"+t.theme},[n("ul",{staticClass:"wui-step-content",style:{paddingBottom:t.hasBottom?"42px":"10px",paddingTop:t.hasTop?"42px":"10px"}},[t._t("default")],2)])},r=[];o._withStripped=!0;var i={render:o,staticRenderFns:r};e.a=i},3:function(t,e,n){"use strict";t.exports=function(t,e){for(var n=[],o={},r=0;r<e.length;r++){var i=e[r],s=i[0],u=i[1],p=i[2],a=i[3],c={id:t+":"+r,css:u,media:p,sourceMap:a};o[s]?o[s].parts.push(c):n.push(o[s]={id:s,parts:[c]})}return n}},50:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"w-step",data:function(){return{hasTop:!1,hasBottom:!1}},props:{theme:{validator:function(t){return t&&["top","bottom"].indexOf(t)>-1},default:"bottom"},current:{validator:function(t){return/^\d*$/.test(t)},default:0},currentColor:{default:"#0DB78A"}},methods:{updateChildStatus:function(t){var e=this,n=this.$children.filter(function(t){return"w-step-item"===t.$options.name});n.forEach(function(o,r){o.stepNumber=r+1,r+1===n.length&&e.current>=o.stepNumber?o.current=o.stepNumber:o.current=e.current,o.theme=e.theme,o.$slots.bottom&&(e.hasBottom=!0),o.$slots.top&&(e.hasTop=!0),o.loaded&&!t||(o.setCurrentClass(),o.loaded=!0)})}},watch:{current:function(){var t=this;this.$nextTick(function(){t.updateChildStatus(!0)})}}}}});