You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

10 lines
2.6 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/uni-number-box/uni-number-box"],{"00ed":function(t,e,i){"use strict";i.r(e);var u=i("dc88"),a=i("6c07");for(var n in a)"default"!==n&&function(t){i.d(e,t,(function(){return a[t]}))}(n);i("dd31");var s,r=i("f0c5"),l=Object(r["a"])(a["default"],u["b"],u["c"],!1,null,"1b55f4e6",null,!1,u["a"],s);e["default"]=l.exports},"6c07":function(t,e,i){"use strict";i.r(e);var u=i("a549"),a=i.n(u);for(var n in u)"default"!==n&&function(t){i.d(e,t,(function(){return u[t]}))}(n);e["default"]=a.a},a549:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u={name:"hxNumberBox",props:{value:{type:[Number,String],default:0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},disabled:{type:Boolean,default:!1},rowData:{type:Object,default:function(){return{}}},clickTime:{type:Number,default:0}},data:function(){return{inputValue:0,addStaus:!0}},watch:{value:function(t){this.inputValue=+t},inputValue:function(t,e){}},created:function(){this.inputValue=+this.value},methods:{_calcValue:function(t){var e=this;if(!this.disabled){var i=this._getDecimalScale(),u=this.inputValue*i,a=this.step*i;if("minus"===t){if(this.$emit("lessChange",this.inputValue,this.rowData),u-=a,u<this.min)return;u>this.max&&(u=this.max)}else if("plus"===t){if(this.$emit("addChange",this.inputValue,this.rowData),e.clickTime>0){if(!this.addStaus)return;this.addStaus=!1,setTimeout((function(){e.addStaus=!0}),e.clickTime)}if(u+=a,u>this.max)return;u<this.min&&(u=this.min)}this.inputValue=String(u/i),this.$emit("change",this.inputValue,this.rowData)}},_getDecimalScale:function(){var t=1;return~~this.step!==this.step&&(t=Math.pow(10,(this.step+"").split(".")[1].length)),t},_onBlur:function(t){var e=t.detail.value;e&&(e=+e,e>this.max?e=this.max:e<this.min&&(e=this.min),this.inputValue=e)}}};e.default=u},ae14:function(t,e,i){},dc88:function(t,e,i){"use strict";var u;i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){return u}));var a=function(){var t=this,e=t.$createElement;t._self._c},n=[]},dd31:function(t,e,i){"use strict";var u=i("ae14"),a=i.n(u);a.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/uni-number-box/uni-number-box-create-component',
{
'components/uni-number-box/uni-number-box-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("00ed"))
})
},
[['components/uni-number-box/uni-number-box-create-component']]
]);