| 12345678910 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/plugin/number-box"],{1971:function(t,e,u){"use strict";var i=function(){var t=this,e=t.$createElement;t._self._c},n=[];u.d(e,"a",(function(){return i})),u.d(e,"b",(function(){return n}))},"1b1f":function(t,e,u){"use strict";var i=u("d7c7"),n=u.n(i);n.a},"1bfd":function(t,e,u){"use strict";u.r(e);var i=u("1971"),n=u("78e1");for(var a in n)"default"!==a&&function(t){u.d(e,t,(function(){return n[t]}))}(a);u("1b1f");var l=u("5511"),s=Object(l["a"])(n["default"],i["a"],i["b"],!1,null,null,null);e["default"]=s.exports},"78e1":function(t,e,u){"use strict";u.r(e);var i=u("950d"),n=u.n(i);for(var a in i)"default"!==a&&function(t){u.d(e,t,(function(){return i[t]}))}(a);e["default"]=n.a},"950d":function(t,e,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"tuiNumberbox",props:{value:{type:Number,default:1},min:{type:Number,default:1},max:{type:Number,default:99},step:{type:Number,default:1},disabled:{type:Boolean,default:!1},iconSize:{type:Number,default:26},iconColor:{type:String,default:"#666666"},height:{type:Number,default:42},width:{type:Number,default:80},size:{type:Number,default:28},bgcolor:{type:String,default:"#F5F5F5"},color:{type:String,default:"#333"},index:{type:[Number,String],default:0},custom:{type:[Number,String],default:0}},created:function(){this.inputValue=+this.value},data:function(){return{inputValue:0}},watch:{value:function(t){this.inputValue=+t}},methods:{getScale:function(){var t=1;return Number.isInteger(this.step)||(t=Math.pow(10,(this.step+"").split(".")[1].length)),t},calcNum:function(t){if(!this.disabled){var e=this.getScale(),u=this.value*e,i=this.step*e;"reduce"===t?u-=i:"plus"===t&&(u+=i);var n=u/e;"plus"===t&&n<this.min?n=this.min:"reduce"===t&&n>this.max&&(n=this.max),n<this.min||n>this.max||this.handleChange(n,t)}},plus:function(){this.calcNum("plus")},reduce:function(){this.calcNum("reduce")},blur:function(t){var e=t.detail.value;e?(~e.indexOf(".")&&Number.isInteger(this.step)&&(e=e.split(".")[0]),e=Number(e),e>this.max?e=this.max:e<this.min&&(e=this.min)):e=this.min,e==this.value&&e!=this.inputValue&&(this.inputValue=e),this.handleChange(e,"blur")},handleChange:function(t,e){this.disabled||this.$emit("change",{value:t,type:e,index:this.index,custom:this.custom})}}};e.default=i},d7c7:function(t,e,u){}}]);
- ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
- 'components/plugin/number-box-create-component',
- {
- 'components/plugin/number-box-create-component':(function(module, exports, __webpack_require__){
- __webpack_require__('d1ae')['createComponent'](__webpack_require__("1bfd"))
- })
- },
- [['components/plugin/number-box-create-component']]
- ]);
|