glhcp/server/public/_nuxt/cc8567e.js

1 line
6.2 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{519:function(t,n,e){var content=e(532);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,e(18).default)("8e6e7932",content,!0,{sourceMap:!1})},530:function(t,n,e){"use strict";var r=e(2),o=e(4),l=e(68),c=e(302),d=e(301),h=e(3),f=RangeError,m=String,v=Math.floor,x=o(d),y=o("".slice),C=o(1..toFixed),S=function(t,n,e){return 0===n?e:n%2==1?S(t,n-1,e*t):S(t*t,n/2,e)},V=function(data,t,n){for(var e=-1,r=n;++e<6;)r+=t*data[e],data[e]=r%1e7,r=v(r/1e7)},N=function(data,t){for(var n=6,e=0;--n>=0;)e+=data[n],data[n]=v(e/t),e=e%t*1e7},F=function(data){for(var t=6,s="";--t>=0;)if(""!==s||0===t||0!==data[t]){var n=m(data[t]);s=""===s?n:s+x("0",7-n.length)+n}return s};r({target:"Number",proto:!0,forced:h((function(){return"0.000"!==C(8e-5,3)||"1"!==C(.9,0)||"1.25"!==C(1.255,2)||"1000000000000000128"!==C(0xde0b6b3a7640080,0)}))||!h((function(){C({})}))},{toFixed:function(t){var n,e,r,o,d=c(this),h=l(t),data=[0,0,0,0,0,0],v="",C="0";if(h<0||h>20)throw f("Incorrect fraction digits");if(d!=d)return"NaN";if(d<=-1e21||d>=1e21)return m(d);if(d<0&&(v="-",d=-d),d>1e-21)if(e=(n=function(t){for(var n=0,e=t;e>=4096;)n+=12,e/=4096;for(;e>=2;)n+=1,e/=2;return n}(d*S(2,69,1))-69)<0?d*S(2,-n,1):d/S(2,n,1),e*=4503599627370496,(n=52-n)>0){for(V(data,0,e),r=h;r>=7;)V(data,1e7,0),r-=7;for(V(data,S(10,r,1),0),r=n-1;r>=23;)N(data,1<<23),r-=23;N(data,1<<r),V(data,1,1),N(data,2),C=F(data)}else V(data,0,e),V(data,1<<-n,0),C=F(data)+x("0",h);return C=h>0?v+((o=C.length)<=h?"0."+x("0",h-o)+C:y(C,0,o-h)+"."+y(C,o-h)):v+C}})},531:function(t,n,e){"use strict";e(519)},532:function(t,n,e){var r=e(17)((function(i){return i[1]}));r.push([t.i,".number-box[data-v-1d9d8f36]{align-items:center;display:inline-flex}.number-box .number-input[data-v-1d9d8f36]{align-items:center;justify-content:center;margin:0 6px;padding:0;position:relative;text-align:center}.number-box .minus[data-v-1d9d8f36],.number-box .plus[data-v-1d9d8f36]{align-items:center;cursor:pointer;display:flex;justify-content:center;width:32px}.number-box .plus[data-v-1d9d8f36]{border-radius:0 2px 2px 0}.number-box .minus[data-v-1d9d8f36]{border-radius:2px 0 0 2px}.number-box .disabled[data-v-1d9d8f36]{background:#f7f8fa!important;color:#c8c9cc!important}.number-box .input-disabled[data-v-1d9d8f36]{background-color:#f2f3f5!important;color:#c8c9cc!important}",""]),r.locals={},t.exports=r},546:function(t,n,e){"use strict";e.r(n);e(300),e(39),e(12),e(47),e(530),e(87);var r={components:{},props:{value:{type:Number,default:1},bgColor:{type:String,default:" #F2F3F5"},min:{type:Number,default:0},max:{type:Number,default:99999},step:{type:Number,default:1},disabled:{type:Boolean,default:!1},size:{type:[Number,String],default:14},inputWidth:{type:[Number,String],default:64},color:{type:String,default:"#333"},inputHeight:{type:[Number,String],default:32},index:{type:[Number,String],default:""},disabledInput:{type:Boolean,default:!1},positiveInteger:{type:Boolean,default:!0},asyncChange:{type:Boolean,default:!1}},watch:{value:function(t,n){this.changeFromInner||(this.inputVal=t,this.$nextTick((function(){this.changeFromInner=!1})))},inputVal:function(t,n){var e=this;if(""!=t){var r=0;r=/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)&&t>=this.min&&t<=this.max?t:n,this.positiveInteger&&(t<0||-1!==String(t).indexOf("."))&&(r=n,this.$nextTick((function(){e.inputVal=n}))),this.asyncChange||this.handleChange(r,"change")}}},data:function(){return{inputVal:1,timer:null,changeFromInner:!1,innerChangeTimer:null}},created:function(){this.inputVal=Number(this.value)},computed:{},methods:{btnTouchStart:function(t){this[t]()},minus:function(){this.computeVal("minus")},plus:function(){this.computeVal("plus")},calcPlus:function(t,n){var e,r,o;try{r=t.toString().split(".")[1].length}catch(t){r=0}try{o=n.toString().split(".")[1].length}catch(t){o=0}return((t*(e=Math.pow(10,Math.max(r,o)))+n*e)/e).toFixed(r>=o?r:o)},calcMinus:function(t,n){var e,r,o;try{r=t.toString().split(".")[1].length}catch(t){r=0}try{o=n.toString().split(".")[1].length}catch(t){o=0}return((t*(e=Math.pow(10,Math.max(r,o)))-n*e)/e).toFixed(r>=o?r:o)},computeVal:function(t){if(!this.disabled){var n=0;"minus"===t?n=this.calcMinus(this.inputVal,this.step):"plus"===t&&(n=this.calcPlus(this.inputVal,this.step)),n<this.min||n>this.max||(this.asyncChange?this.$emit("change",n):(this.inputVal=n,this.handleChange(n,t)))}},onBlur:function(t){var n=this,e=0,r=t.target.value;console.log(r),(e=/(^\d+$)/.test(r)?+r:this.min)>this.max?e=this.max:e<this.min&&(e=this.min),this.$nextTick((function(){n.inputVal=e})),this.handleChange(e,"blur")},onFocus:function(){this.$emit("focus")},handleChange:function(t,n){var e=this;this.disabled||(this.innerChangeTimer&&(clearTimeout(this.innerChangeTimer),this.innerChangeTimer=null),this.changeFromInner=!0,this.innerChangeTimer=setTimeout((function(){e.changeFromInner=!1}),150),this.$emit("input",Number(t)),this.$emit(n,{value:Number(t),index:this.index}))}}},o=(e(531),e(9)),component=Object(o.a)(r,(function(){var t=this,n=t._self._c;return n("div",{staticClass:"number-box"},[n("div",{class:{minus:!0,disabled:t.disabled||t.inputVal<=t.min},style:{background:t.bgColor,height:t.inputHeight+"px",color:t.color},on:{click:function(n){return n.stopPropagation(),n.preventDefault(),t.btnTouchStart("minus")}}},[n("div",{style:{fontSize:t.size+"px"}},[t._v("-")])]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.inputVal,expression:"inputVal"}],class:{"number-input":!0,"input-disabled":t.disabled},style:{color:t.color,fontSize:t.size+"px",background:t.bgColor,height:t.inputHeight+"px",width:t.inputWidth+"px"},attrs:{disabled:t.disabledInput||t.disabled,type:"text"},domProps:{value:t.inputVal},on:{blur:t.onBlur,focus:t.onFocus,input:function(n){n.target.composing||(t.inputVal=n.target.value)}}}),t._v(" "),n("div",{staticClass:"plus",class:{disabled:t.disabled||t.inputVal>=t.max},style:{background:t.bgColor,height:t.inputHeight+"px",color:t.color},on:{click:function(n){return n.stopPropagation(),n.preventDefault(),t.btnTouchStart("plus")}}},[n("div",{style:{fontSize:t.size+"px"}},[t._v("+")])])])}),[],!1,null,"1d9d8f36",null);n.default=component.exports}}]);