w-ui
Version:
A Vue.js 2.0 UI Toolkit for mobile
1 lines • 10.6 kB
JavaScript
module.exports=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="",t(t.s=236)}({0:function(e,t){e.exports=function(e,t,n,r,o,i){var s,a=e=e||{},c=typeof e.default;"object"!==c&&"function"!==c||(s=e,a=e.default);var u="function"==typeof a?a.options:a;t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId=o);var f;if(i?(f=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__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},u._ssrRegister=f):r&&(f=r),f){var l=u.functional,d=l?u.render:u.beforeCreate;l?(u._injectStyles=f,u.render=function(e,t){return f.call(t),d(e,t)}):u.beforeCreate=d?[].concat(d,f):[f]}return{esModule:s,exports:a,options:u}}},1:function(e,t,n){"use strict";function r(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=o(r);return[n].concat(r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"})).concat([i]).join("\n")}return[n].join("\n")}function o(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=r(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var s=e[o];"number"==typeof s[0]&&r[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 r(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(i(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(i(n.parts[o]));f[n.id]={id:n.id,refs:1,parts:s}}}}function o(){var e=document.createElement("style");return e.type="text/css",l.appendChild(e),e}function i(e){var t,n,r=document.querySelector("style["+v+'~="'+e.id+'"]');if(r){if(p)return m;r.parentNode.removeChild(r)}if(b){var i=h++;r=d||(d=o()),t=s.bind(null,r,i,!1),n=s.bind(null,r,i,!0)}else r=o(),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 s(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=C(t,o);else{var i=document.createTextNode(o),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,r=t.media,o=t.sourceMap;if(r&&e.setAttribute("media",r),g.ssrId&&e.setAttribute(v,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))}}var c="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!c)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 u=n(3),f={},l=c&&(document.head||document.getElementsByTagName("head")[0]),d=null,h=0,p=!1,m=function(){},g=null,v="data-vue-ssr-id",b="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,n,o){p=n,g=o||{};var i=u(e,t);return r(i),function(t){for(var n=[],o=0;o<i.length;o++){var s=i[o],a=f[s.id];a.refs--,n.push(a)}t?(i=u(e,t),r(i)):i=[];for(var o=0;o<n.length;o++){var a=n[o];if(0===a.refs){for(var c=0;c<a.parts.length;c++)a.parts[c]();delete f[a.id]}}}};var C=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},236:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Search=void 0;var r=n(237),o=function(e){return e&&e.__esModule?e:{default:e}}(r);t.Search=o.default},237:function(e,t,n){"use strict";function r(e){c||n(238)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(49),i=n.n(o);for(var s in o)"default"!==s&&function(e){n.d(t,e,function(){return o[e]})}(s);var a=n(242),c=!1,u=n(0),f=r,l=u(i.a,a.a,!1,f,null,null);l.options.__file="packages/search/src/Search.vue",t.default=l.exports},238:function(e,t,n){var r=n(239);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(2)("ba7b516c",r,!1,{})},239:function(e,t,n){var r=n(6);t=e.exports=n(1)(!1),t.push([e.i,"\n.ref-item {\n background-color: #fff;\n font-size: 0.6rem;\n font-weight: normal;\n color: #808080;\n height: 2rem;\n line-height: 2rem;\n padding-left: 0.6rem;\n border-bottom: 1px solid #f5f5f5;\n}\n.search-form {\n height: 0.4rem;\n background: #fff;\n text-align: center;\n border-bottom: 1px solid #f5f5f5;\n width: 100%;\n top: 0;\n padding: 0 0.2rem;\n}\n.search-form-wrap {\n width: 100%;\n overflow: hidden;\n}\n.search-form-inner {\n -webkit-transition: all 0.5s ease;\n transition: all 0.5s ease;\n}\n.search-form-inner.active {\n margin-right: 0.1rem;\n}\n.search-form-input-wrap {\n height: 0.8rem;\n border-radius: 4px;\n position: relative;\n margin: 0;\n overflow: hidden;\n background: #f5f5f5;\n}\n.search-form-input {\n border: none;\n outline: none;\n height: 0.8rem;\n width: 100%;\n height: 100%;\n padding-left: 0.2rem;\n font-size: 14px;\n background: #f5f5f5;\n}\n.search-form-icon {\n position: absolute;\n background-image: url("+r(n(240))+");\n background-repeat: no-repeat;\n background-position: 50% 50%;\n width: 0.4rem;\n height: 0, 4rem;\n background-color: #f5f5f5;\n}\n.search-form-clear {\n height: 100%;\n width: 0.4rem;\n line-height: 0.4rem;\n text-align: center;\n position: absolute;\n top: 0;\n right: 0;\n border-radius: 50%;\n background-image: url("+r(n(241))+");\n background-position: 50% 50%;\n background-repeat: no-repeat;\n}\n.search-form-button {\n float: right;\n color: #fff;\n text-align: center;\n background: #ff2d4b;\n border: none;\n font-size: 14px;\n}\n",""])},240:function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMCAzMCI+CiAgICA8ZyBzdHJva2U9IiNhZGFkYWQiIHN0cm9rZS13aWR0aD0iMiIgZmlsbD0idHJhbnNwYXJlbnQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCI+CiAgICAgICAgPGNpcmNsZSByPSIxMiIgY3g9IjEzIiBjeT0iMTMiIC8+CiAgICAgICAgPHBvbHlsaW5lIHBvaW50cz0iMjIgMjIsMjkgMjkiIC8+CiAgICA8L2c+Cjwvc3ZnPgo="},241:function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MCA2MCI+CiAgICA8ZyBzdHJva2U9IiNjY2NjY2MiIHN0cm9rZS13aWR0aD0iMiIgZmlsbD0iI2NjY2NjYyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIj4KICAgICAgICA8Y2lyY2xlIHI9IjI5IiBjeD0iMzAiIGN5PSIzMCIgLz4KICAgICAgICA8cG9seWxpbmUgcG9pbnRzPSIyMCAyMCw0MCA0MCIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjIiLz4KICAgICAgICA8cG9seWxpbmUgcG9pbnRzPSI0MCAyMCwyMCA0MCIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjIiLz4KICAgIDwvZz4KPC9zdmc+"},242:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("form",{staticClass:"search-form",on:{submit:function(t){return t.preventDefault(),e.submit(t)}}},[n("div",{staticClass:"search-form-wrap"},[n("div",{class:{"search-form-inner":!0,active:e.active}},[n("div",{staticClass:"search-form-input-wrap"},[n("div",{staticClass:"search-form-icon"}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.keyword,expression:"keyword"}],ref:"input",staticClass:"search-form-input",attrs:{type:"text",name:"keyword",placeholder:e.placeholder||"请输入关键字"},domProps:{value:e.keyword},on:{focus:e.focus,keyup:e.onChange,input:function(t){t.target.composing||(e.keyword=t.target.value)}}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.showClear,expression:"showClear"}],staticClass:"search-form-clear",on:{click:e.clear}})]),e._v(" "),n("button",{staticClass:"search-form-button",attrs:{type:"submit"}},[e._v("搜索")])])])]),e._v(" "),e._l(e.result,function(t){return n("div",{directives:[{name:"show",rawName:"v-show",value:e.showRef,expression:"showRef"}],staticClass:"ref-item",on:{click:function(n){e.submit(t.key)}}},[e._v("\n "+e._s(t.caption)+"\n")])})],2)},o=[];r._withStripped=!0;var i={render:r,staticRenderFns:o};t.a=i},3:function(e,t,n){"use strict";e.exports=function(e,t){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],s=i[0],a=i[1],c=i[2],u=i[3],f={id:e+":"+o,css:a,media:c,sourceMap:u};r[s]?r[s].parts.push(f):n.push(r[s]={id:s,parts:[f]})}return n}},49:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"wm-search",props:{value:String,placeholder:String,result:Array,show:Boolean,searchCb:Function,onChangeCb:Function,onChangeCallInterval:Number},data:function(){return{active:!1,keyword:this.value||"",timeout:null,showRef:!1}},computed:{showClear:function(){return this.keyword}},methods:{clear:function(){this.keyword="",this.$refs.input.focus()},submit:function(e){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.active=!0,this.$refs.input.blur(),this.searchCb&&"[object Function]"===Object.prototype.toString.call(this.searchCb)&&(e&&"[object String]"===Object.prototype.toString.call(e)?(this.searchCb(e),this.keyword=e,this.showRef=!1):this.keyword&&(this.searchCb(this.keyword),this.showRef=!1))},focus:function(){this.active=!1},onChange:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null);var e=function(){};this.onChangeCb&&"[object Function]"===Object.prototype.toString.call(this.onChangeCb)&&(e=this.onChangeCb,this.showRef=!0),this.timeout=setTimeout(e.bind(this,this.keyword),this.onChangeCallInterval||500)}},mounted:function(){var e=this;this.$nextTick(function(){e.$refs.input.focus()})}}},6:function(e,t,n){"use strict";e.exports=function(e){return"string"!=typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)?'"'+e.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':e)}}});