(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/uni-number-box/uni-number-box"],{"2fd2":function(t,i,e){},"44b0":function(t,i,e){"use strict";e.r(i);var n=e("5eaa"),u=e("7919");for(var a in u)["default"].indexOf(a)<0&&function(t){e.d(i,t,(function(){return u[t]}))}(a);e("dd0f");var l=e("828b"),s=Object(l["a"])(u["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);i["default"]=s.exports},"5eaa":function(t,i,e){"use strict";e.d(i,"b",(function(){return n})),e.d(i,"c",(function(){return u})),e.d(i,"a",(function(){}));var n=function(){var t=this.$createElement;this._self._c},u=[]},"617c":function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var n={name:"UniNumberBox",props:{value:{type:[Number,String],default:1},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},disabled:{type:Boolean,default:!1},inputDisabled:{type:Boolean,default:!1},size:{type:String,default:"default"},index:{type:[Number,String],default:-1}},data:function(){return{inputValue:0,initialValue:0,initialIndex:0}},watch:{value:function(t){this.inputValue=+t},inputValue:function(t,i,e){0!=+t&&+t==this.initialValue||this.initialIndex==this.index&&+t!==+i&&this.$emit("change",t,e)}},created:function(){this.initialValue=+this.value,this.inputValue=+this.value,this.initialIndex=this.index},methods:{_calcValue:function(t){if(!this.disabled){var i=this._getDecimalScale(),e=this.inputValue*i,n=this.step*i;"minus"===t?e-=n:"plus"===t&&(e+=n),e<this.min&&"minus"===t||e>this.max&&"plus"===t?this.$emit("limit",{value:this.inputValue,type:t},this.index):this.inputValue=e/i}},_getDecimalScale:function(){var t=1;return~~this.step!==this.step&&(t=Math.pow(10,(this.step+"").split(".")[1].length)),t},_onInput:function(t){var i=this;setTimeout((function(){var e=t.detail.value;e=+e,e>i.max?(e=i.max,i.$util.showToast({title:"商品库存不足"})):e<i.min&&(i.$util.showToast({title:"商品最少购买"+i.min+"件"}),e=i.min),e||(e=1),i.inputValue=e,i.$forceUpdate()}),0)}}};i.default=n},7919:function(t,i,e){"use strict";e.r(i);var n=e("617c"),u=e.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){e.d(i,t,(function(){return n[t]}))}(a);i["default"]=u.a},dd0f:function(t,i,e){"use strict";var n=e("2fd2"),u=e.n(n);u.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__('df3c')['createComponent'](__webpack_require__("44b0"))
        })
    },
    [['components/uni-number-box/uni-number-box-create-component']]
]);
