@deanwu/vue-component-library 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue")):"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vue-component-library"]=e(require("vue")):t["vue-component-library"]=e(t["Vue"])})("undefined"!==typeof self?self:this,(function(t){return function(){"use strict";var e={9662:function(t,e,n){var i=n(614),a=n(6330),r=TypeError;t.exports=function(t){if(i(t))return t;throw r(a(t)+" is not a function")}},9670:function(t,e,n){var i=n(111),a=String,r=TypeError;t.exports=function(t){if(i(t))return t;throw r(a(t)+" is not an object")}},1318:function(t,e,n){var i=n(5656),a=n(1400),r=n(6244),o=function(t){return function(e,n,o){var s,l=i(e),u=r(l),c=a(o,u);if(t&&n!==n){while(u>c)if(s=l[c++],s!==s)return!0}else for(;u>c;c++)if((t||c in l)&&l[c]===n)return t||c||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},3658:function(t,e,n){var i=n(9781),a=n(3157),r=TypeError,o=Object.getOwnPropertyDescriptor,s=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(a(t)&&!o(t,"length").writable)throw r("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},4326:function(t,e,n){var i=n(1702),a=i({}.toString),r=i("".slice);t.exports=function(t){return r(a(t),8,-1)}},9920:function(t,e,n){var i=n(2597),a=n(3887),r=n(1236),o=n(3070);t.exports=function(t,e,n){for(var s=a(e),l=o.f,u=r.f,c=0;c<s.length;c++){var p=s[c];i(t,p)||n&&i(n,p)||l(t,p,u(e,p))}}},8880:function(t,e,n){var i=n(9781),a=n(3070),r=n(9114);t.exports=i?function(t,e,n){return a.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},9114:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},8052:function(t,e,n){var i=n(614),a=n(3070),r=n(6339),o=n(3072);t.exports=function(t,e,n,s){s||(s={});var l=s.enumerable,u=void 0!==s.name?s.name:e;if(i(n)&&r(n,u,s),s.global)l?t[e]=n:o(e,n);else{try{s.unsafe?t[e]&&(l=!0):delete t[e]}catch(c){}l?t[e]=n:a.f(t,e,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},3072:function(t,e,n){var i=n(7854),a=Object.defineProperty;t.exports=function(t,e){try{a(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},9781:function(t,e,n){var i=n(7293);t.exports=!i((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:function(t){var e="object"==typeof document&&document.all,n="undefined"==typeof e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:n}},317:function(t,e,n){var i=n(7854),a=n(111),r=i.document,o=a(r)&&a(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},7207:function(t){var e=TypeError,n=9007199254740991;t.exports=function(t){if(t>n)throw e("Maximum allowed index exceeded");return t}},8113:function(t){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7392:function(t,e,n){var i,a,r=n(7854),o=n(8113),s=r.process,l=r.Deno,u=s&&s.versions||l&&l.version,c=u&&u.v8;c&&(i=c.split("."),a=i[0]>0&&i[0]<4?1:+(i[0]+i[1])),!a&&o&&(i=o.match(/Edge\/(\d+)/),(!i||i[1]>=74)&&(i=o.match(/Chrome\/(\d+)/),i&&(a=+i[1]))),t.exports=a},748:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(t,e,n){var i=n(7854),a=n(1236).f,r=n(8880),o=n(8052),s=n(3072),l=n(9920),u=n(4705);t.exports=function(t,e){var n,c,p,f,h,d,v=t.target,m=t.global,g=t.stat;if(c=m?i:g?i[v]||s(v,{}):(i[v]||{}).prototype,c)for(p in e){if(h=e[p],t.dontCallGetSet?(d=a(c,p),f=d&&d.value):f=c[p],n=u(m?p:v+(g?".":"#")+p,t.forced),!n&&void 0!==f){if(typeof h==typeof f)continue;l(h,f)}(t.sham||f&&f.sham)&&r(h,"sham",!0),o(c,p,h,t)}}},7293:function(t){t.exports=function(t){try{return!!t()}catch(e){return!0}}},4374:function(t,e,n){var i=n(7293);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6916:function(t,e,n){var i=n(4374),a=Function.prototype.call;t.exports=i?a.bind(a):function(){return a.apply(a,arguments)}},6530:function(t,e,n){var i=n(9781),a=n(2597),r=Function.prototype,o=i&&Object.getOwnPropertyDescriptor,s=a(r,"name"),l=s&&"something"===function(){}.name,u=s&&(!i||i&&o(r,"name").configurable);t.exports={EXISTS:s,PROPER:l,CONFIGURABLE:u}},1702:function(t,e,n){var i=n(4374),a=Function.prototype,r=a.call,o=i&&a.bind.bind(r,r);t.exports=i?o:function(t){return function(){return r.apply(t,arguments)}}},5005:function(t,e,n){var i=n(7854),a=n(614),r=function(t){return a(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?r(i[t]):i[t]&&i[t][e]}},8173:function(t,e,n){var i=n(9662),a=n(8554);t.exports=function(t,e){var n=t[e];return a(n)?void 0:i(n)}},7854:function(t,e,n){var i=function(t){return t&&t.Math===Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof n.g&&n.g)||function(){return this}()||this||Function("return this")()},2597:function(t,e,n){var i=n(1702),a=n(7908),r=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return r(a(t),e)}},3501:function(t){t.exports={}},4664:function(t,e,n){var i=n(9781),a=n(7293),r=n(317);t.exports=!i&&!a((function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},8361:function(t,e,n){var i=n(1702),a=n(7293),r=n(4326),o=Object,s=i("".split);t.exports=a((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"===r(t)?s(t,""):o(t)}:o},2788:function(t,e,n){var i=n(1702),a=n(614),r=n(5465),o=i(Function.toString);a(r.inspectSource)||(r.inspectSource=function(t){return o(t)}),t.exports=r.inspectSource},9909:function(t,e,n){var i,a,r,o=n(4811),s=n(7854),l=n(111),u=n(8880),c=n(2597),p=n(5465),f=n(6200),h=n(3501),d="Object already initialized",v=s.TypeError,m=s.WeakMap,g=function(t){return r(t)?a(t):i(t,{})},y=function(t){return function(e){var n;if(!l(e)||(n=a(e)).type!==t)throw v("Incompatible receiver, "+t+" required");return n}};if(o||p.state){var b=p.state||(p.state=new m);b.get=b.get,b.has=b.has,b.set=b.set,i=function(t,e){if(b.has(t))throw v(d);return e.facade=t,b.set(t,e),e},a=function(t){return b.get(t)||{}},r=function(t){return b.has(t)}}else{var x=f("state");h[x]=!0,i=function(t,e){if(c(t,x))throw v(d);return e.facade=t,u(t,x,e),e},a=function(t){return c(t,x)?t[x]:{}},r=function(t){return c(t,x)}}t.exports={set:i,get:a,has:r,enforce:g,getterFor:y}},3157:function(t,e,n){var i=n(4326);t.exports=Array.isArray||function(t){return"Array"===i(t)}},614:function(t,e,n){var i=n(4154),a=i.all;t.exports=i.IS_HTMLDDA?function(t){return"function"==typeof t||t===a}:function(t){return"function"==typeof t}},4705:function(t,e,n){var i=n(7293),a=n(614),r=/#|\.prototype\./,o=function(t,e){var n=l[s(t)];return n===c||n!==u&&(a(e)?i(e):!!e)},s=o.normalize=function(t){return String(t).replace(r,".").toLowerCase()},l=o.data={},u=o.NATIVE="N",c=o.POLYFILL="P";t.exports=o},8554:function(t){t.exports=function(t){return null===t||void 0===t}},111:function(t,e,n){var i=n(614),a=n(4154),r=a.all;t.exports=a.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:i(t)||t===r}:function(t){return"object"==typeof t?null!==t:i(t)}},1913:function(t){t.exports=!1},2190:function(t,e,n){var i=n(5005),a=n(614),r=n(7976),o=n(3307),s=Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return a(e)&&r(e.prototype,s(t))}},6244:function(t,e,n){var i=n(7466);t.exports=function(t){return i(t.length)}},6339:function(t,e,n){var i=n(1702),a=n(7293),r=n(614),o=n(2597),s=n(9781),l=n(6530).CONFIGURABLE,u=n(2788),c=n(9909),p=c.enforce,f=c.get,h=String,d=Object.defineProperty,v=i("".slice),m=i("".replace),g=i([].join),y=s&&!a((function(){return 8!==d((function(){}),"length",{value:8}).length})),b=String(String).split("String"),x=t.exports=function(t,e,n){"Symbol("===v(h(e),0,7)&&(e="["+m(h(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!o(t,"name")||l&&t.name!==e)&&(s?d(t,"name",{value:e,configurable:!0}):t.name=e),y&&n&&o(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(a){}var i=p(t);return o(i,"source")||(i.source=g(b,"string"==typeof e?e:"")),t};Function.prototype.toString=x((function(){return r(this)&&f(this).source||u(this)}),"toString")},4758:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var i=+t;return(i>0?n:e)(i)}},3070:function(t,e,n){var i=n(9781),a=n(4664),r=n(3353),o=n(9670),s=n(4948),l=TypeError,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,p="enumerable",f="configurable",h="writable";e.f=i?r?function(t,e,n){if(o(t),e=s(e),o(n),"function"===typeof t&&"prototype"===e&&"value"in n&&h in n&&!n[h]){var i=c(t,e);i&&i[h]&&(t[e]=n.value,n={configurable:f in n?n[f]:i[f],enumerable:p in n?n[p]:i[p],writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(o(t),e=s(e),o(n),a)try{return u(t,e,n)}catch(i){}if("get"in n||"set"in n)throw l("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:function(t,e,n){var i=n(9781),a=n(6916),r=n(5296),o=n(9114),s=n(5656),l=n(4948),u=n(2597),c=n(4664),p=Object.getOwnPropertyDescriptor;e.f=i?p:function(t,e){if(t=s(t),e=l(e),c)try{return p(t,e)}catch(n){}if(u(t,e))return o(!a(r.f,t,e),t[e])}},8006:function(t,e,n){var i=n(6324),a=n(748),r=a.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},5181:function(t,e){e.f=Object.getOwnPropertySymbols},7976:function(t,e,n){var i=n(1702);t.exports=i({}.isPrototypeOf)},6324:function(t,e,n){var i=n(1702),a=n(2597),r=n(5656),o=n(1318).indexOf,s=n(3501),l=i([].push);t.exports=function(t,e){var n,i=r(t),u=0,c=[];for(n in i)!a(s,n)&&a(i,n)&&l(c,n);while(e.length>u)a(i,n=e[u++])&&(~o(c,n)||l(c,n));return c}},5296:function(t,e){var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a=i&&!n.call({1:2},1);e.f=a?function(t){var e=i(this,t);return!!e&&e.enumerable}:n},2140:function(t,e,n){var i=n(6916),a=n(614),r=n(111),o=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&a(n=t.toString)&&!r(s=i(n,t)))return s;if(a(n=t.valueOf)&&!r(s=i(n,t)))return s;if("string"!==e&&a(n=t.toString)&&!r(s=i(n,t)))return s;throw o("Can't convert object to primitive value")}},3887:function(t,e,n){var i=n(5005),a=n(1702),r=n(8006),o=n(5181),s=n(9670),l=a([].concat);t.exports=i("Reflect","ownKeys")||function(t){var e=r.f(s(t)),n=o.f;return n?l(e,n(t)):e}},4488:function(t,e,n){var i=n(8554),a=TypeError;t.exports=function(t){if(i(t))throw a("Can't call method on "+t);return t}},6200:function(t,e,n){var i=n(2309),a=n(9711),r=i("keys");t.exports=function(t){return r[t]||(r[t]=a(t))}},5465:function(t,e,n){var i=n(7854),a=n(3072),r="__core-js_shared__",o=i[r]||a(r,{});t.exports=o},2309:function(t,e,n){var i=n(1913),a=n(5465);(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.32.2",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE",source:"https://github.com/zloirock/core-js"})},6293:function(t,e,n){var i=n(7392),a=n(7293),r=n(7854),o=r.String;t.exports=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},1400:function(t,e,n){var i=n(9303),a=Math.max,r=Math.min;t.exports=function(t,e){var n=i(t);return n<0?a(n+e,0):r(n,e)}},5656:function(t,e,n){var i=n(8361),a=n(4488);t.exports=function(t){return i(a(t))}},9303:function(t,e,n){var i=n(4758);t.exports=function(t){var e=+t;return e!==e||0===e?0:i(e)}},7466:function(t,e,n){var i=n(9303),a=Math.min;t.exports=function(t){return t>0?a(i(t),9007199254740991):0}},7908:function(t,e,n){var i=n(4488),a=Object;t.exports=function(t){return a(i(t))}},7593:function(t,e,n){var i=n(6916),a=n(111),r=n(2190),o=n(8173),s=n(2140),l=n(5112),u=TypeError,c=l("toPrimitive");t.exports=function(t,e){if(!a(t)||r(t))return t;var n,l=o(t,c);if(l){if(void 0===e&&(e="default"),n=i(l,t,e),!a(n)||r(n))return n;throw u("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},4948:function(t,e,n){var i=n(7593),a=n(2190);t.exports=function(t){var e=i(t,"string");return a(e)?e:e+""}},6330:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(n){return"Object"}}},9711:function(t,e,n){var i=n(1702),a=0,r=Math.random(),o=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++a+r,36)}},3307:function(t,e,n){var i=n(6293);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:function(t,e,n){var i=n(9781),a=n(7293);t.exports=i&&a((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4811:function(t,e,n){var i=n(7854),a=n(614),r=i.WeakMap;t.exports=a(r)&&/native code/.test(String(r))},5112:function(t,e,n){var i=n(7854),a=n(2309),r=n(2597),o=n(9711),s=n(6293),l=n(3307),u=i.Symbol,c=a("wks"),p=l?u["for"]||u:u&&u.withoutSetter||o;t.exports=function(t){return r(c,t)||(c[t]=s&&r(u,t)?u[t]:p("Symbol."+t)),c[t]}},7658:function(t,e,n){var i=n(2109),a=n(7908),r=n(6244),o=n(3658),s=n(7207),l=n(7293),u=l((function(){return 4294967297!==[].push.call({length:4294967296},1)})),c=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},p=u||!c();i({target:"Array",proto:!0,arity:1,forced:p},{push:function(t){var e=a(this),n=r(e),i=arguments.length;s(n+i);for(var l=0;l<i;l++)e[n]=arguments[l],n++;return o(e,n),n}})},7203:function(e){e.exports=t}},n={};function i(t){var a=n[t];if(void 0!==a)return a.exports;var r=n[t]={exports:{}};return e[t].call(r.exports,r,r.exports,i),r.exports}!function(){i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,{a:e}),e}}(),function(){i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}}(),function(){i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){i.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){i.p=""}();var a={};return function(){if(i.r(a),i.d(a,{default:function(){return dt}}),"undefined"!==typeof window){var t=window.document.currentScript,e=t&&t.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);e&&(i.p=e[1])}var n=function(){var t=this,e=t._self._c;return e("button",{staticClass:"c-button",attrs:{color:t.color,size:t.size,hollow:t.hollow,disabled:!!t.disabled},on:{click:e=>t.$emit("click",e)}},[e("div",{staticClass:"flex-center"},[t.icon?e("i",{staticClass:"tf",class:t.icon}):t._e(),e("span",[t._t("default")],2)])])},r=[],o={name:"cButton",props:{size:{type:String,default:"s"},color:{type:String,default:"black"},hollow:Boolean,disabled:Boolean,icon:String}},s=o;function l(t,e,n,i,a,r,o,s){var l,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),r&&(u._scopeId="data-v-"+r),o?(l=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__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},u._ssrRegister=l):a&&(l=s?function(){a.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:a),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(t,e){return l.call(e),c(t,e)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,l):[l]}return{exports:t,options:u}}var u=l(s,n,r,!1,null,"73616ebe",null),c=u.exports,p=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"show",rawName:"v-show",value:"hidden"!=t.type,expression:"type != 'hidden'"}],staticClass:"c-input",class:{"c-textarea":"textarea"==t.type,"z-dis":t.disabled}},["textarea"==t.type?e("div",[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.valueData,expression:"valueData"}],ref:"input",style:{"padding-bottom":t.maxlength?"20px":"8px"},attrs:{placeholder:t.placeholder,maxlength:t.maxlength,disabled:t.disabled,readonly:t.readonly},domProps:{value:t.valueData},on:{input:[function(e){e.target.composing||(t.valueData=e.target.value)},t.inputHandle],focus:t.inputHandle,blur:t.inputHandle,change:function(e){return t.$emit("change")}}}),t.maxlength?e("span",{staticClass:"c-input-length"},[t._v(t._s(t.valueData.length)+" / "+t._s(t.maxlength))]):t._e()]):e("div",{staticClass:"flex"},["stepper"==t.type&&"both"==t.stepControls?e("button",{staticClass:"c-input-step flex-center",class:{"z-dis":""!==t.valueData&&!1!==t.minRange&&t.minRange==t.valueData},on:{click:function(e){return t.stepHandle(-1)}}},[e("i",{staticClass:"tf tf-minus"})]):t._e(),"checkbox"===t.compType?e("input",{directives:[{name:"model",rawName:"v-model",value:t.valueData,expression:"valueData"}],ref:"input",staticClass:"flex-grow",attrs:{placeholder:t.placeholder,maxlength:t.maxlength,disabled:t.disabled,readonly:t.readonly,type:"checkbox"},domProps:{checked:Array.isArray(t.valueData)?t._i(t.valueData,null)>-1:t.valueData},on:{input:t.inputHandle,focus:t.inputHandle,blur:t.inputHandle,change:[function(e){var n=t.valueData,i=e.target,a=!!i.checked;if(Array.isArray(n)){var r=null,o=t._i(n,r);i.checked?o<0&&(t.valueData=n.concat([r])):o>-1&&(t.valueData=n.slice(0,o).concat(n.slice(o+1)))}else t.valueData=a},function(e){return t.$emit("change")}]}}):"radio"===t.compType?e("input",{directives:[{name:"model",rawName:"v-model",value:t.valueData,expression:"valueData"}],ref:"input",staticClass:"flex-grow",attrs:{placeholder:t.placeholder,maxlength:t.maxlength,disabled:t.disabled,readonly:t.readonly,type:"radio"},domProps:{checked:t._q(t.valueData,null)},on:{input:t.inputHandle,focus:t.inputHandle,blur:t.inputHandle,change:[function(e){t.valueData=null},function(e){return t.$emit("change")}]}}):e("input",{directives:[{name:"model",rawName:"v-model",value:t.valueData,expression:"valueData"}],ref:"input",staticClass:"flex-grow",attrs:{placeholder:t.placeholder,maxlength:t.maxlength,disabled:t.disabled,readonly:t.readonly,type:t.compType},domProps:{value:t.valueData},on:{input:[function(e){e.target.composing||(t.valueData=e.target.value)},t.inputHandle],focus:t.inputHandle,blur:t.inputHandle,change:function(e){return t.$emit("change")}}}),t.clear&&t.valueData?e("a",{staticClass:"c-input-handle clear flex-center",on:{click:t.clearHandle}},[e("i",{staticClass:"tf tf-clear"})]):t._e(),t.visible?e("a",{staticClass:"c-input-handle flex-center",on:{click:function(e){t.visibleState=!t.visibleState}}},[e("i",{staticClass:"tf tf-eyes",class:{"tf-eyes-close":t.visibleState}})]):t._e(),e("div",{staticClass:"flex-column"},["stepper"==t.type?e("button",{staticClass:"c-input-step flex-center flex-grow",class:{"z-dis":""!==t.valueData&&!1!==t.maxRange&&t.maxRange==t.valueData},on:{click:function(e){return t.stepHandle(1)}}},[e("i",{staticClass:"tf tf-plus"})]):t._e(),"stepper"==t.type&&"side"==t.stepControls?e("button",{staticClass:"c-input-step flex-center flex-grow",class:{"z-dis":""!==t.valueData&&!1!==t.minRange&&t.minRange==t.valueData},on:{click:function(e){return t.stepHandle(-1)}}},[e("i",{staticClass:"tf tf-minus"})]):t._e()]),t.unit?e("span",{staticClass:"c-input-unit flex-center"},[t._v(t._s(t.unit))]):t._e()])])},f=[],h={name:"cInput",props:{type:{type:String,default:"text"},value:[Number,String],name:String,placeholder:String,maxlength:[Number,String],decimal:[Number,String],range:[Number,String,Array],disabled:Boolean,readonly:Boolean,unit:String,visible:Boolean,clear:{type:Boolean,default:!0},step:{type:[String,Number],default:1},stepControls:{type:String,default:"both"}},data(){return{valueData:this.value||"",visibleState:!1}},computed:{compType(){return"number"==this.type||this.visibleState?"text":this.type},compRange(){return!!this.range&&("string"==typeof this.range?this.range.split(","):this.range)},minRange(){return"object"==typeof this.compRange&&2==this.compRange.length&&parseFloat(this.compRange[0])},maxRange(){return!1!==this.compRange&&parseFloat(this.compRange[1])},compDecimal(){return"number"==this.type?this.decimal||0:"stepper"==this.type&&(this.decimal||99)}},watch:{value(t){this.set(t)},valueData(){this.$emit("input",this.get())}},methods:{set(t=""){this.valueData=t.toString()},get(){return this.valueData},inputHandle(t){if(!1!==this.compDecimal){var e=[[this.compDecimal?"[^-\\d\\.]+$":"[^-\\d]+$",""],["^(-?)0?(\\d+)$","$1$2"],["^(-?)\\.$","$1"],["\\.(\\d*)\\.+",".$1"],["^(\\d+\\.?\\d*)-+","$1"],["^(-\\d*\\.?\\d*)-+","$1"],["^(-?\\d+\\.\\d{"+this.compDecimal+"}).+","$1"]];e.forEach((t=>{this.valueData=this.valueData.toString().replace(new RegExp(t[0]),t[1])})),""!==this.valueData&&"blur"==t.type&&(!1!==this.minRange&&this.valueData<this.minRange&&(this.valueData=this.minRange),!1!==this.maxRange&&this.valueData>this.maxRange&&(this.valueData=this.maxRange))}"input"!=t.type&&this.$emit(t.type,t)},clearHandle(){this.valueData="",this.$refs.input.focus()},stepHandle(t){let e=this.valueData.toString().split(".")[1]||"",n=this.step.toString().split(".")[1]||"",i=n.length>e.length?n.length:e.length;this.valueData=parseFloat(((parseFloat(this.valueData)||0)+t*parseFloat(this.step)).toFixed(i)),this.inputHandle({type:"blur"})}}},d=h,v=l(d,p,f,!1,null,"3a00d18a",null),m=v.exports,g=function(){var t=this,e=t._self._c;return e("div",{staticClass:"c-radio",class:{"z-chk":t.checkState,"z-dis":t.disabledState},on:{click:t.checkHandle}},[e("div"),t.$slots.default?e("span",[t._t("default")],2):t._e()])},y=[],b=i(7203),x=i.n(b);function D(t){return new(x().extend({data(){return t},methods:{commit(t,e){this[t]=e}}}))}function S(t){const e={};return t.forEach((t=>{e[t]={get(){return this.store[t]},set(){}}})),e}var w={name:"cRadio",props:{value:[Number,String],disabled:Boolean},data(){return{store:this.$parent.store}},computed:{...S(["valueData","groupDisabled"]),checkState(){return this.valueData==this.value},disabledState(){return this.groupDisabled||this.disabled}},methods:{checkHandle(){this.disabledState||this.store.commit("valueData",this.value)}}},_=w,C=l(_,g,y,!1,null,"07d956d7",null),j=C.exports,k=function(){var t=this,e=t._self._c;return e("div",{staticClass:"c-radio-group"},[t.$slots.default?t._t("default"):t._l(t.options,(function(n,i){return e("c-radio",{key:i,attrs:{value:n.value}},[t._v(t._s(n.name))])}))],2)},$=[],O={name:"cRadioGroup",props:{value:[String,Number],name:String,disabled:Boolean,options:Array},data(){return{store:D({valueData:this.value,groupDisabled:this.disabled})}},computed:{...S(["valueData"])},watch:{value(t){this.set(t)},valueData(){this.$emit("input",this.get())},disabled(t){this.store.commit("groupDisabled",t)}},methods:{set(t=""){this.store.commit("valueData",t)},get(){return this.valueData}}},H=O,P=l(H,k,$,!1,null,"ac0a5b94",null),T=P.exports,E=function(){var t=this,e=t._self._c;return e("div",{staticClass:"c-checkbox",class:{"z-chk":t.checkState,"z-dis":t.disabledState},on:{click:function(e){return t.checkHandle(!t.checkState)}}},[t._m(0),t.$slots.default?e("span",[t._t("default")],2):t._e()])},N=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"flex-center"},[e("i",{staticClass:"tf tf-check"})])}],R={name:"cCheckbox",props:{value:[Number,String,Boolean],disabled:Boolean},data(){return{inGroup:"cCheckboxGroup"==this.$parent.$options.name,store:this.$parent.store}},computed:{...S(["valueData","limit","groupDisabled"]),parseValueData(){return"object"==typeof this.valueData?Array.from(this.valueData,(t=>t.toString())):this.valueData.toString()?this.valueData.toString().split(","):[]},checkState(){return this.inGroup?this.parseValueData.includes(this.value.toString()):this.value},disabledState(){return this.inGroup&&this.inGroupDisabled||this.disabled},overflow(){return!this.checkState&&this.limit>0&&this.parseValueData.length>=this.limit}},methods:{checkHandle(t){if(this.disabledState)return;if(!this.inGroup)return void this.$emit("input",t);if(this.overflow)return void this.$message({message:`最多只能选择${this.limit}项`});let e;t?e=this.parseValueData.concat([this.value.toString()]):(e=this.parseValueData.join(",").split(","),e.splice(e.indexOf(this.value.toString()),1)),this.store.commit("valueData","object"==typeof this.valueData?e:e.join(","))}}},A=R,z=l(A,E,N,!1,null,"5c30b59c",null),V=z.exports,B=function(){var t=this,e=t._self._c;return e("div",{staticClass:"c-checkbox-group"},[t.$slots.default?t._t("default"):t._l(t.options,(function(n,i){return e("c-checkbox",{key:i,attrs:{value:n.value}},[t._v(t._s(n.name))])}))],2)},F=[],I={name:"cCheckboxGroup",props:{value:{type:[String,Number,Array],default:""},name:String,disabled:Boolean,limit:[String,Number],options:Array},data(){return{store:D({valueData:this.value,limit:parseInt(this.limit),groupDisabled:this.disabled})}},computed:{...S(["valueData"])},watch:{value(t){this.set(t)},valueData(){this.$emit("input",this.get())},limit(t){this.store.commit("limit",t)},disabled(t){this.store.commit("groupDisabled",t)}},methods:{set(t=("object"==typeof this.valueData?[]:"")){this.store.commit("valueData",t)},get(){return this.valueData}}},L=I,M=l(L,B,F,!1,null,"1189f524",null),G=M.exports,W=function(){var t=this,e=t._self._c;return e("div",{staticClass:"c-select",class:{"z-develop":t.listPosition,"z-dis":t.disabled},on:{click:t.developHandle}},[e("div",{staticClass:"c-select-main flex-between-center"},[e("span",{staticClass:"c-select-current flex-grow ellipsis",class:{"z-empty":t.emptyState}},[t._v(t._s(t.emptyState?t.placeholder:t.valueName))]),t.clear&&t.valueData.length?e("a",{staticClass:"c-select-clear flex-center",on:{click:function(e){return e.stopPropagation(),t.clearHandle.apply(null,arguments)}}},[e("i",{staticClass:"tf tf-clear"})]):t._e(),t._m(0)]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.listPosition,expression:"listPosition"}],ref:"list",staticClass:"c-select-options",style:t.listPosition,on:{click:function(t){t.stopPropagation()}}},[e("select-list",{attrs:{options:t.options,multiple:t.multiple}})],1)])},U=[function(){var t=this,e=t._self._c;return e("span",{staticClass:"c-select-angle flex-center"},[e("i",{staticClass:"tf tf-angle-down"})])}];i(7658);function q(t,e,n=0){var i=[];return e&&e.map((e=>{i=i.concat([t("div",{class:"flex-center-cross c-select-options-item flex-center-cross "+(this.currentValue.includes(e.value.toString())?"z-crt":""),attrs:{title:e.name},on:{click:()=>this.clickHandle(e)}},[n?[t("div",{class:"c-select-options-item-level tf tf-level-line",style:`margin-left: ${20*(n-1)}px;`})]:[],t("p",{class:"ellipsis flex-grow"},[e.name]),this.multiple?[t("i",{class:"c-select-options-item-check tf tf-check"})]:[]])]).concat(q.call(this,t,e.children,n+1))})),i}const X={render(t){return t("div",[q.call(this,t,this.options)])},props:{options:Array,multiple:Boolean},data(){return{store:this.$parent.store}},computed:{...S(["valueData","currentData"]),currentValue(){return Array.from(this.currentData,(t=>t.value.toString()))}},watch:{valueData(){this.updateCurrentData()},options(){this.updateCurrentData()}},mounted(){this.$el.addEventListener("wheel",(t=>{t.stopPropagation()})),this.updateCurrentData()},methods:{updateCurrentData(){let t=[],e="object"==typeof this.valueData?Array.from(this.valueData,(t=>t.toString())):this.valueData.toString().split(",");e.length&&function n(i){i.forEach((i=>{e.includes(i.value.toString())&&t.push(i),i.children&&n(i.children)}))}(this.options),this.store.commit("currentData",t)},clickHandle(t){let e;this.multiple?(this.currentData.includes(t)?(e=Array.from(this.currentData,(t=>t)),e.splice(e.indexOf(t),1)):e=this.currentData.concat([t]),this.store.commit("currentData",e),e=Array.from(e,(t=>t.value)),this.store.commit("valueData","object"==typeof this.valueData?e:e.join(",")),this.$parent.$emit("change",this.$parent.get())):(this.currentValue.includes(t.value.toString())||(this.store.commit("currentData",[t]),this.store.commit("valueData",t.value),this.$parent.$emit("change",this.$parent.get())),this.$parent.foldHandle())}}};var J={name:"cSelect",components:{selectList:X},props:{name:String,value:{type:[String,Number,Array],default:""},placeholder:{type:String,default:"请选择"},options:{type:Array,default:()=>[]},listWidth:[Number,String],listHeight:{type:[Number,String],default:300},multiple:Boolean,disabled:Boolean,clear:{type:Boolean,default:!0}},data(){return{store:D({valueData:this.value,currentData:[]}),listPosition:!1}},computed:{...S(["valueData","currentData"]),valueName(){return Array.from(this.currentData,(t=>t.name)).join(",")},emptyState(){return!this.valueData||this.multiple&&!this.valueData.length},optionsClone(){return JSON.parse(JSON.stringify(this.options||[]))}},watch:{value(t){this.set(t)},valueData(){this.$emit("input",this.get())},optionsClone(t,e){e&&e.length>0&&this.set()},currentData(t){}},methods:{set(t=(this.multiple&&"object"==typeof this.valueData?[]:"")){this.store.commit("valueData",t)},get(){return this.valueData},getCurrentData(){return this.multiple?this.currentData:this.currentData[0]||{}},developHandle(){this.listPosition||this.disabled||(this.listPosition=!0,this.$nextTick((()=>{let t=this.$el.getBoundingClientRect(),e=this.$refs.list.offsetHeight<this.listHeight?this.$refs.list.offsetHeight:this.listHeight,n=window.innerHeight-t.bottom<e;this.listPosition={left:t.left+"px",top:(n?t.top-e+1:t.top+this.$el.offsetHeight-1)+"px",width:(this.listWidth||this.$el.offsetWidth)+"px","max-height":this.parsePixel(this.listHeight)}})),setTimeout((()=>{window.addEventListener("click",this.foldHandle),window.addEventListener("wheel",this.foldHandle)})))},foldHandle(){this.listPosition=!1,window.removeEventListener("click",this.foldHandle),window.removeEventListener("wheel",this.foldHandle)},clearHandle(){this.set("object"==typeof this.valueData?[]:"")}}},K=J,Y=l(K,W,U,!1,null,null,null),Q=Y.exports,Z=function(){var t=this,e=t._self._c;return e("div",{staticClass:"c-file"},[e("div",{class:{"flex-start-end":t.media}},[t.media?e("div",{staticClass:"c-file-media flex-wrap"},[t.parseValueData.length?t._e():e("div",{staticClass:"c-file-media-item flex-center empty",on:{click:t.uploadHandle}},[e("i",{staticClass:"tf tf-media"})]),t._l(t.parseValueData,(function(n,i){return e("div",{key:n,staticClass:"c-file-media-item flex-center",on:{click:function(e){return t.$preview({src:n})}}},[t.isVideo(n)?e("video",{attrs:{src:n}}):e("img",{attrs:{src:n}}),e("a",{staticClass:"flex-center",on:{click:function(e){return e.stopPropagation(),t.removeHandle(i)},mousedown:function(t){t.stopPropagation()}}},[e("i",{staticClass:"tf tf-cross"})])])}))],2):t._e(),e("div",{class:{"flex-column":t.media,"flex-center-cross":!t.media}},[e("c-button",{attrs:{color:"gray",icon:t.icon,hollow:""},on:{click:t.uploadHandle}},[t._v(t._s(t.button))]),t.tip||t.$slots.tip||t.fileTypeTip?e("div",{staticClass:"c-file-tip",style:{"margin-top":t.media?"4px":""}},[t._t("tip",null,{type:t.fileTypeTip}),t.$scopedSlots.tip?t._e():e("div",{class:{"flex-center":!t.media}},[t.tip?e("p",[t._v(t._s(t.tip))]):t._e(),t.fileTypeTip?e("p",[t._v(t._s(t.tip&&!t.media?",":"")+t._s(t.fileTypeTip))]):t._e()])],2):t._e()],1)]),t.media?t._e():e("ul",{directives:[{name:"show",rawName:"v-show",value:t.parseValueData.length,expression:"parseValueData.length"}],staticClass:"c-file-list"},t._l(t.parseValueData,(function(n,i){return e("li",{key:i},[e("span",[t._v(t._s(t.fileName(n)))]),e("a",{on:{click:function(e){return t.removeHandle(i)}}},[t._v("[删除]")])])})),0)])},tt=[],et={name:"cUploadFile",props:{name:String,type:[String,Array],size:[String,Number],media:Boolean,icon:{type:String,default:"upload"},button:{type:String,default:"上传文件"},tip:String,value:{type:[String,Array],default:""},multiple:Boolean,limit:{type:[Number,String],default:1},custom:Boolean},data(){return{valueData:this.value}},computed:{parseValueData(){return this.valueData?"object"==typeof this.valueData?this.valueData:this.valueData.toString().split(","):[]},fileType(){if(this.type){let t=[];return this.type.split(",").forEach((e=>{t=t.concat({image:["jpg","jpeg","png"],video:["mp4"],word:["doc","docx"],excel:["xls","xlsx"],zip:["zip","7z","rar"]}[e]||[e])})),t}return""},fileTypeTip(){if(this.type){let t=[];return this.type.split(",").forEach((e=>{t=t.concat({image:["图片"],video:["mp4"],word:["doc(x)"],excel:["xls(x)"],zip:["压缩包"]}[e]||[e])})),"支持格式:"+t.join(",")}return""},fileName(){return t=>t.substring(t.lastIndexOf("/")+1)},isVideo(){return t=>"mp4"==t.substring(t.lastIndexOf(".")+1)}},watch:{value(t){this.set(t)},valueData(){this.$emit("input",this.get())}},methods:{set(t=(this.limit>1&&"object"==typeof this.valueData?[]:"")){this.valueData=t},get(){return this.valueData},removeHandle(t){let e=this.parseValueData.join(",").split(",");e.splice(t,1),this.set(this.limit>1&&"object"==typeof this.valueData?e:e.join(","))},uploadHandle(){this.parseValueData.length>=parseInt(this.limit)?this.$message({message:`最多只能上传${this.limit}个文件`}):this.custom?this.$emit("click"):this.uploadFile({fileType:Array.from(this.fileType,(t=>"."+t)).join(","),fileSize:this.size,multiple:this.multiple||parseInt(this.limit)>1,success:t=>{this.multiple||1!=this.limit?(t=this.parseValueData.concat(t),this.set("object"==typeof this.valueData?t:t.join(","))):this.set(t[0])}})}}},nt=et,it=l(nt,Z,tt,!1,null,"2077e74c",null),at=it.exports,rt=function(){var t=this,e=t._self._c;return t.src?e("div",{staticClass:"c-file flex"},[e("i",{staticClass:"tf tf-fw tf-file",class:`tf-file-${t.suffix}`}),e("a",{on:{click:t.download}},[t._v(t._s(t.fileName))])]):t._e()},ot=[],st={name:"cFile",props:{src:String},computed:{fileName(){if(!this.src)return"";let t=this.src.split("/");return t[t.length-1]},suffix(){if(!this.src)return"";var t=this.src.split(".");return t[t.length-1].toLowerCase()}},methods:{download(){window.open(this.src)}}},lt=st,ut=l(lt,rt,ot,!1,null,"abb21c70",null),ct=ut.exports;const pt=[c,m,j,T,V,G,Q,at,ct],ft=function(t,e){pt.forEach((e=>{t.component(e.name,e)}))};var ht=ft,dt=ht}(),a}()}));
1
+ (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue")):"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vue-component-library"]=e(require("vue")):t["vue-component-library"]=e(t["Vue"])})("undefined"!==typeof self?self:this,(function(t){return function(){"use strict";var e={203:function(e){e.exports=t}},a={};function i(t){var n=a[t];if(void 0!==n)return n.exports;var s=a[t]={exports:{}};return e[t](s,s.exports,i),s.exports}!function(){i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,{a:e}),e}}(),function(){i.d=function(t,e){for(var a in e)i.o(e,a)&&!i.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})}}(),function(){i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){i.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){i.p=""}();var n={};return function(){if(i.r(n),i.d(n,{default:function(){return K}}),"undefined"!==typeof window){var t=window.document.currentScript,e=t&&t.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);e&&(i.p=e[1])}var a=function(){var t=this,e=t._self._c;return e("button",{staticClass:"c-button",attrs:{color:t.color,size:t.size,hollow:t.hollow,disabled:!!t.disabled},on:{click:e=>t.$emit("click",e)}},[e("div",{staticClass:"flex-center"},[t.icon?e("i",{staticClass:"tf",class:t.icon}):t._e(),e("span",[t._t("default")],2)])])},s=[],l={name:"cButton",props:{size:{type:String,default:"s"},color:{type:String,default:"black"},hollow:Boolean,disabled:Boolean,icon:String}},r=l;function o(t,e,a,i,n,s,l,r){var o,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=a,u._compiled=!0),i&&(u.functional=!0),s&&(u._scopeId="data-v-"+s),l?(o=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__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(l)},u._ssrRegister=o):n&&(o=r?function(){n.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:n),o)if(u.functional){u._injectStyles=o;var c=u.render;u.render=function(t,e){return o.call(e),c(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,o):[o]}return{exports:t,options:u}}var u=o(r,a,s,!1,null,"73616ebe",null),c=u.exports,d=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"show",rawName:"v-show",value:"hidden"!=t.type,expression:"type != 'hidden'"}],staticClass:"c-input",class:{"c-textarea":"textarea"==t.type,"z-dis":t.disabled}},["textarea"==t.type?e("div",[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.valueData,expression:"valueData"}],ref:"input",style:{"padding-bottom":t.maxlength?"20px":"8px"},attrs:{placeholder:t.placeholder,maxlength:t.maxlength,disabled:t.disabled,readonly:t.readonly},domProps:{value:t.valueData},on:{input:[function(e){e.target.composing||(t.valueData=e.target.value)},t.inputHandle],focus:t.inputHandle,blur:t.inputHandle,change:function(e){return t.$emit("change")}}}),t.maxlength?e("span",{staticClass:"c-input-length"},[t._v(t._s(t.valueData.length)+" / "+t._s(t.maxlength))]):t._e()]):e("div",{staticClass:"flex"},["stepper"==t.type&&"both"==t.stepControls?e("button",{staticClass:"c-input-step flex-center",class:{"z-dis":""!==t.valueData&&!1!==t.minRange&&t.minRange==t.valueData},on:{click:function(e){return t.stepHandle(-1)}}},[e("i",{staticClass:"tf tf-minus"})]):t._e(),"checkbox"===t.compType?e("input",{directives:[{name:"model",rawName:"v-model",value:t.valueData,expression:"valueData"}],ref:"input",staticClass:"flex-grow",attrs:{placeholder:t.placeholder,maxlength:t.maxlength,disabled:t.disabled,readonly:t.readonly,type:"checkbox"},domProps:{checked:Array.isArray(t.valueData)?t._i(t.valueData,null)>-1:t.valueData},on:{input:t.inputHandle,focus:t.inputHandle,blur:t.inputHandle,change:[function(e){var a=t.valueData,i=e.target,n=!!i.checked;if(Array.isArray(a)){var s=null,l=t._i(a,s);i.checked?l<0&&(t.valueData=a.concat([s])):l>-1&&(t.valueData=a.slice(0,l).concat(a.slice(l+1)))}else t.valueData=n},function(e){return t.$emit("change")}]}}):"radio"===t.compType?e("input",{directives:[{name:"model",rawName:"v-model",value:t.valueData,expression:"valueData"}],ref:"input",staticClass:"flex-grow",attrs:{placeholder:t.placeholder,maxlength:t.maxlength,disabled:t.disabled,readonly:t.readonly,type:"radio"},domProps:{checked:t._q(t.valueData,null)},on:{input:t.inputHandle,focus:t.inputHandle,blur:t.inputHandle,change:[function(e){t.valueData=null},function(e){return t.$emit("change")}]}}):e("input",{directives:[{name:"model",rawName:"v-model",value:t.valueData,expression:"valueData"}],ref:"input",staticClass:"flex-grow",attrs:{placeholder:t.placeholder,maxlength:t.maxlength,disabled:t.disabled,readonly:t.readonly,type:t.compType},domProps:{value:t.valueData},on:{input:[function(e){e.target.composing||(t.valueData=e.target.value)},t.inputHandle],focus:t.inputHandle,blur:t.inputHandle,change:function(e){return t.$emit("change")}}}),t.clear&&t.valueData?e("a",{staticClass:"c-input-handle clear flex-center",on:{click:t.clearHandle}},[e("i",{staticClass:"tf tf-clear"})]):t._e(),t.visible?e("a",{staticClass:"c-input-handle flex-center",on:{click:function(e){t.visibleState=!t.visibleState}}},[e("i",{staticClass:"tf tf-eyes",class:{"tf-eyes-close":t.visibleState}})]):t._e(),e("div",{staticClass:"flex-column"},["stepper"==t.type?e("button",{staticClass:"c-input-step flex-center flex-grow",class:{"z-dis":""!==t.valueData&&!1!==t.maxRange&&t.maxRange==t.valueData},on:{click:function(e){return t.stepHandle(1)}}},[e("i",{staticClass:"tf tf-plus"})]):t._e(),"stepper"==t.type&&"side"==t.stepControls?e("button",{staticClass:"c-input-step flex-center flex-grow",class:{"z-dis":""!==t.valueData&&!1!==t.minRange&&t.minRange==t.valueData},on:{click:function(e){return t.stepHandle(-1)}}},[e("i",{staticClass:"tf tf-minus"})]):t._e()]),t.unit?e("span",{staticClass:"c-input-unit flex-center"},[t._v(t._s(t.unit))]):t._e()])])},p=[],h={name:"cInput",props:{type:{type:String,default:"text"},value:[Number,String],name:String,placeholder:String,maxlength:[Number,String],decimal:[Number,String],range:[Number,String,Array],disabled:Boolean,readonly:Boolean,unit:String,visible:Boolean,clear:{type:Boolean,default:!0},step:{type:[String,Number],default:1},stepControls:{type:String,default:"both"}},data(){return{valueData:this.value||"",visibleState:!1}},computed:{compType(){return"number"==this.type||this.visibleState?"text":this.type},compRange(){return!!this.range&&("string"==typeof this.range?this.range.split(","):this.range)},minRange(){return"object"==typeof this.compRange&&2==this.compRange.length&&parseFloat(this.compRange[0])},maxRange(){return!1!==this.compRange&&parseFloat(this.compRange[1])},compDecimal(){return"number"==this.type?this.decimal||0:"stepper"==this.type&&(this.decimal||99)}},watch:{value(t){this.set(t)},valueData(){this.$emit("input",this.get())}},methods:{set(t=""){this.valueData=t.toString()},get(){return this.valueData},inputHandle(t){if(!1!==this.compDecimal){var e=[[this.compDecimal?"[^-\\d\\.]+$":"[^-\\d]+$",""],["^(-?)0?(\\d+)$","$1$2"],["^(-?)\\.$","$1"],["\\.(\\d*)\\.+",".$1"],["^(\\d+\\.?\\d*)-+","$1"],["^(-\\d*\\.?\\d*)-+","$1"],["^(-?\\d+\\.\\d{"+this.compDecimal+"}).+","$1"]];e.forEach((t=>{this.valueData=this.valueData.toString().replace(new RegExp(t[0]),t[1])})),""!==this.valueData&&"blur"==t.type&&(!1!==this.minRange&&this.valueData<this.minRange&&(this.valueData=this.minRange),!1!==this.maxRange&&this.valueData>this.maxRange&&(this.valueData=this.maxRange))}"input"!=t.type&&this.$emit(t.type,t)},clearHandle(){this.valueData="",this.$refs.input.focus()},stepHandle(t){let e=this.valueData.toString().split(".")[1]||"",a=this.step.toString().split(".")[1]||"",i=a.length>e.length?a.length:e.length;this.valueData=parseFloat(((parseFloat(this.valueData)||0)+t*parseFloat(this.step)).toFixed(i)),this.inputHandle({type:"blur"})}}},v=h,m=o(v,d,p,!1,null,"3a00d18a",null),f=m.exports,g=function(){var t=this,e=t._self._c;return e("div",{staticClass:"c-radio",class:{"z-chk":t.checkState,"z-dis":t.disabledState},on:{click:t.checkHandle}},[e("div"),t.$slots.default?e("span",[t._t("default")],2):t._e()])},b=[],D=i(203),y=i.n(D);function x(t){return new(y().extend({data(){return t},methods:{commit(t,e){this[t]=e}}}))}function _(t){const e={};return t.forEach((t=>{e[t]={get(){return this.store[t]},set(){}}})),e}var S={name:"cRadio",props:{value:[Number,String],disabled:Boolean},data(){return{store:this.$parent.store}},computed:{..._(["valueData","groupDisabled"]),checkState(){return this.valueData==this.value},disabledState(){return this.groupDisabled||this.disabled}},methods:{checkHandle(){this.disabledState||this.store.commit("valueData",this.value)}}},C=S,$=o(C,g,b,!1,null,"07d956d7",null),k=$.exports,w=function(){var t=this,e=t._self._c;return e("div",{staticClass:"c-radio-group"},[t.$slots.default?t._t("default"):t._l(t.options,(function(a,i){return e("c-radio",{key:i,attrs:{value:a.value}},[t._v(t._s(a.name))])}))],2)},R=[],H={name:"cRadioGroup",props:{value:[String,Number],name:String,disabled:Boolean,options:Array},data(){return{store:x({valueData:this.value,groupDisabled:this.disabled})}},computed:{..._(["valueData"])},watch:{value(t){this.set(t)},valueData(){this.$emit("input",this.get())},disabled(t){this.store.commit("groupDisabled",t)}},methods:{set(t=""){this.store.commit("valueData",t)},get(){return this.valueData}}},N=H,j=o(N,w,R,!1,null,"ac0a5b94",null),B=j.exports,z=function(){var t=this,e=t._self._c;return e("div",{staticClass:"c-checkbox",class:{"z-chk":t.checkState,"z-dis":t.disabledState},on:{click:function(e){return t.checkHandle(!t.checkState)}}},[t._m(0),t.$slots.default?e("span",[t._t("default")],2):t._e()])},T=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"flex-center"},[e("i",{staticClass:"tf tf-check"})])}],A={name:"cCheckbox",props:{value:[Number,String,Boolean],disabled:Boolean},data(){return{inGroup:"cCheckboxGroup"==this.$parent.$options.name,store:this.$parent.store}},computed:{..._(["valueData","limit","groupDisabled"]),parseValueData(){return"object"==typeof this.valueData?Array.from(this.valueData,(t=>t.toString())):this.valueData.toString()?this.valueData.toString().split(","):[]},checkState(){return this.inGroup?this.parseValueData.includes(this.value.toString()):this.value},disabledState(){return this.inGroup&&this.inGroupDisabled||this.disabled},overflow(){return!this.checkState&&this.limit>0&&this.parseValueData.length>=this.limit}},methods:{checkHandle(t){if(this.disabledState)return;if(!this.inGroup)return void this.$emit("input",t);if(this.overflow)return void this.$message({message:`最多只能选择${this.limit}项`});let e;t?e=this.parseValueData.concat([this.value.toString()]):(e=this.parseValueData.join(",").split(","),e.splice(e.indexOf(this.value.toString()),1)),this.store.commit("valueData","object"==typeof this.valueData?e:e.join(","))}}},E=A,G=o(E,z,T,!1,null,"5c30b59c",null),O=G.exports,P=function(){var t=this,e=t._self._c;return e("div",{staticClass:"c-checkbox-group"},[t.$slots.default?t._t("default"):t._l(t.options,(function(a,i){return e("c-checkbox",{key:i,attrs:{value:a.value}},[t._v(t._s(a.name))])}))],2)},V=[],F={name:"cCheckboxGroup",props:{value:{type:[String,Number,Array],default:""},name:String,disabled:Boolean,limit:[String,Number],options:Array},data(){return{store:x({valueData:this.value,limit:parseInt(this.limit),groupDisabled:this.disabled})}},computed:{..._(["valueData"])},watch:{value(t){this.set(t)},valueData(){this.$emit("input",this.get())},limit(t){this.store.commit("limit",t)},disabled(t){this.store.commit("groupDisabled",t)}},methods:{set(t=("object"==typeof this.valueData?[]:"")){this.store.commit("valueData",t)},get(){return this.valueData}}},q=F,I=o(q,P,V,!1,null,"1189f524",null),M=I.exports;const U=[c,f,k,B,O,M],X=function(t,e){U.forEach((e=>{t.component(e.name,e)}))};var J=X,K=J}(),n}()}));
2
2
  //# sourceMappingURL=vue-component-library.umd.min.js.map