UNPKG

jem-vue-lib

Version:

Jem vue business components library

2 lines 7.65 kB
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["jem-vue-lib"]=e():t["jem-vue-lib"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"2b0c":function(t,e,n){},3485:function(t,e,n){"use strict";var r=n("e362"),o=n.n(r);e["default"]=o.a},4536:function(t,e,n){"use strict";n("2b0c")},"563d":function(t,e,n){},"767c":function(t,e,n){"use strict";n("563d")},8875:function(t,e,n){var r,o,i;(function(n,c){o=[],r=c,i="function"===typeof r?r.apply(e,o):r,void 0===i||(t.exports=i)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(d){var n,r,o,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,c=/@([^@]*):(\d+):(\d+)\s*$/gi,s=i.exec(d.stack)||c.exec(d.stack),a=s&&s[1]||!1,u=s&&s[2]||!1,l=document.location.href.replace(document.location.hash,""),p=document.getElementsByTagName("script");a===l&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(u-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=n.replace(r,"$1").trim());for(var f=0;f<p.length;f++){if("interactive"===p[f].readyState)return p[f];if(p[f].src===a)return p[f];if(a===l&&p[f].innerHTML&&p[f].innerHTML.trim()===o)return p[f]}return null}}return t}))},"9e13":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAPCAYAAADgbT9oAAAAAXNSR0IArs4c6QAAAg5JREFUOE+VlLtvE0EQxr9vzw6RbBc0SKFIjIQoEAjiiJxiJyJKR7CdAih4VEGCziIiTRyLuIgCBRSEDokOQpeGV0eRhlBAEKLgLwAJ2iCQwDNozvjw4w6SkU63N7f7m29mdpeIsMOF4uAedQ/hJAs4ElAoANo7GNqXOf76CYHI14bItfebz1+zmztSKA4CXBPwBFQ9kl6THIBgC5oxYDHsETr5rkpz90Hkh/xivgPchLo1BUcBbZDsj8oozmfyRRR0nA/Bw/npIcfEI4X6ABM0mbu0FliJW8FqgwLJx3Q6SqUX5Nlm58+VcHLCx3z1Jra3vwV/iqemYP6Ls3PhzA5wNjvZv3cgs0G6EbDZqW5Lp1O4f285qOnVSg2TEz7q1QrqK6t4+uJlNPiYf3qDzo15nkv8K/MWPJ1KYf/Avh6ore1QnMuXPoI6RHr/bZSlfr1yGZ8+f8GF2bmwLC1BHeDjfvkKE3qXYB9JF6faamrp31l9gNL0VFiWVs17FAfNGy/XoKg5IgHQ64ZbTW+vLITpt9c8tnktyPB4sUa4RSh6lB86eACZTApvtj6EMQ1uAWOb167OlFNxA2Ry97u4rXnQ5Z71ufzMIqhLJJM7OR/No/7n6rCRAI2Gno0UlivMVAGpA0x2H5bgEora7MYOHl3fevXkTGzGR/zyJc/DUUfKTpSLyE9P5d3bzWfrNv83rwvuRxR3o7YAAAAASUVORK5CYII="},e362:function(t,e){t.exports={}},fb15:function(t,e,n){"use strict";if(n.r(e),"undefined"!==typeof window){var r=window.document.currentScript,o=n("8875");r=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}var c=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"x-button"},[t._t("default")],2)},s=[],a={name:"x-button",props:{type:String}},u=a;n("767c");function l(t,e,n,r,o,i,c,s){var a,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),c?(a=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(c)},u._ssrRegister=a):o&&(a=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),a)if(u.functional){u._injectStyles=a;var l=u.render;u.render=function(t,e){return a.call(e),l(t,e)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,a):[a]}return{exports:t,options:u}}var p=l(u,c,s,!1,null,"092708aa",null),f=p.exports;f.install=function(t){t.component(f.name,f)};var d=f,h=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"comp-CarNumber"},[r("div",{staticClass:"wra0"},[r("div",{staticClass:"_row0",on:{click:t.openPanel}},[r("input",t._b({staticClass:"_inp",attrs:{type:"text",placeholder:" 请输入车牌号",disabled:""},domProps:{value:t.c_inpText}},"input",t.$attrs,!1))]),r("div",{directives:[{name:"show",rawName:"v-show",value:t.show_panel,expression:"show_panel"}],staticClass:"_row1"},[r("div",{staticClass:"_box _box0"},[r("div",{staticClass:"_key0wra"},t._l(t.provArr,(function(e){return r("div",{key:e,staticClass:"_key _key0",domProps:{textContent:t._s(e)},on:{click:function(n){return t.chooseProv(e)}}})})),0),r("div",{directives:[{name:"show",rawName:"v-show",value:t.show_key1wra,expression:"show_key1wra"}],staticClass:"_key1wra"},[r("div",{staticClass:"mt10"}),t._l(t.numCharArr,(function(e,n){return r("div",{key:e,staticClass:"_key _key1",on:{click:function(n){return t.chooseNumChar(e)}}},[r("span",[t._v(t._s(e))])])}))],2),r("div",{staticClass:"_btns mt10"},[r("div",{staticClass:"_0 _key",on:{click:t.closePanel}},[t._v("关闭")]),r("div",{staticClass:"_key ",on:{click:function(e){return t.delChar()}}},[r("img",{staticStyle:{"vertical-align":"-2px"},attrs:{src:n("9e13"),alt:"删除"}})])])])])])])},m=[];function v(t,e,n){return e>t.length-1?t:t.substring(0,e)+n+t.substring(e+1)}var _={name:"car-number",props:{inpText:{type:String,default:""}},data(){return{show_panel:!1,show_key1wra:!1,c_inpText:this.inpText,provArr:["京","沪","津","渝","冀","豫","云","辽","黑","湘","皖","鲁","苏","浙","赣","鄂","桂","甘","晋","蒙","陕","吉","闽","贵","粤","川","青","藏","琼","宁","新","港","澳","台","使","领","学"],numCharArr:[1,2,3,4,5,6,7,8,9,0,"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]}},created(){console.log("test")},watch:{c_inpText:function(t,e){this.$emit("update:inpText",t),0===this.c_inpText.length&&(this.show_key1wra=!1),t.charAt(0).match(/[\u3400-\u9FBF]/)&&(this.show_key1wra=!0)}},methods:{openPanel(){console.log(1),this.show_panel=!0},closePanel(){this.show_panel=!1},chooseProv(t){console.log(t,"chooseProv"),0==this.c_inpText.length?this.c_inpText=t:this.c_inpText=v(this.c_inpText,0,t),this.$emit("choose-char",t)},chooseNumChar(t){console.log(t,"chooseNumChar"),8!=this.c_inpText.length&&(this.c_inpText+=t,this.$emit("choose-char",t))},delChar(){if(0===this.c_inpText.length)return!1;this.c_inpText=this.c_inpText.slice(0,-1),this.$emit("del-char",item)}},mounted(){}},y=_,w=(n("4536"),n("3485")),A=l(y,h,m,!1,null,"31555da8",null);"function"===typeof w["default"]&&Object(w["default"])(A);var x=A.exports;x.install=function(t){t.component(x.name,x)};var b=x;const g=[d,b],C=function(t){C.installed||g.map(e=>t.component(e.name,e))};"undefined"!==typeof window&&window.Vue&&C(window.Vue);var T={install:C,XButton:d,CarNumber:b};e["default"]=T}})})); //# sourceMappingURL=jem-vue-lib.umd.min.js.map