123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- (global.webpackJsonp = global.webpackJsonp || []).push([ [ "components/uni-number-box" ], {
- 504: function(e, n, t) {
- t.r(n);
- var i = t(505), a = t(507);
- for (var u in a) "default" !== u && function(e) {
- t.d(n, e, function() {
- return a[e];
- });
- }(u);
- t(509);
- var r = t(13), o = Object(r.default)(a.default, i.render, i.staticRenderFns, !1, null, null, null, !1, i.components, void 0);
- o.options.__file = "components/uni-number-box.vue", n.default = o.exports;
- },
- 505: function(e, n, t) {
- t.r(n);
- var i = t(506);
- t.d(n, "render", function() {
- return i.render;
- }), t.d(n, "staticRenderFns", function() {
- return i.staticRenderFns;
- }), t.d(n, "recyclableRender", function() {
- return i.recyclableRender;
- }), t.d(n, "components", function() {
- return i.components;
- });
- },
- 506: function(e, n, t) {
- t.r(n), t.d(n, "render", function() {
- return i;
- }), t.d(n, "staticRenderFns", function() {
- return u;
- }), t.d(n, "recyclableRender", function() {
- return a;
- }), t.d(n, "components", function() {});
- var i = function() {
- var e = this;
- e.$createElement;
- e._self._c;
- }, a = !1, u = [];
- i._withStripped = !0;
- },
- 507: function(e, n, t) {
- t.r(n);
- var i = t(508), a = t.n(i);
- for (var u in i) "default" !== u && function(e) {
- t.d(n, e, function() {
- return i[e];
- });
- }(u);
- n.default = a.a;
- },
- 508: function(e, n, t) {
- Object.defineProperty(n, "__esModule", {
- value: !0
- }), n.default = void 0;
- var i = {
- name: "uni-number-box",
- props: {
- isMax: {
- type: Boolean,
- default: !1
- },
- isMin: {
- type: Boolean,
- default: !1
- },
- index: {
- type: Number,
- default: 0
- },
- value: {
- type: Number,
- default: 0
- },
- min: {
- type: Number,
- default: -1 / 0
- },
- max: {
- type: Number,
- default: 1 / 0
- },
- step: {
- type: Number,
- default: 1
- },
- disabled: {
- type: Boolean,
- default: !1
- }
- },
- data: function() {
- return {
- inputValue: this.value,
- minDisabled: !1,
- maxDisabled: !1
- };
- },
- created: function() {
- this.maxDisabled = this.isMax, this.minDisabled = this.isMin;
- },
- computed: {},
- watch: {
- inputValue: function(e) {
- var n = {
- number: e,
- index: this.index
- };
- this.$emit("eventChange", n);
- }
- },
- methods: {
- _calcValue: function(e) {
- var n = this._getDecimalScale(), t = this.inputValue * n, i = 0, a = this.step * n;
- "subtract" === e ? ((i = t - a) <= this.min && (this.minDisabled = !0), i < this.min && (i = this.min),
- i < this.max && !0 === this.maxDisabled && (this.maxDisabled = !1)) : "add" === e && ((i = t + a) >= this.max && (this.maxDisabled = !0),
- i > this.max && (i = this.max), i > this.min && !0 === this.minDisabled && (this.minDisabled = !1)),
- i !== t && (this.inputValue = i / n);
- },
- _getDecimalScale: function() {
- var e = 1;
- return ~~this.step !== this.step && (e = Math.pow(10, (this.step + "").split(".")[1].length)),
- e;
- },
- _onBlur: function(e) {
- var n = e.detail.value;
- n ? ((n = +n) > this.max ? n = this.max : n < this.min && (n = this.min), this.inputValue = n) : this.inputValue = 0;
- }
- }
- };
- n.default = i;
- },
- 509: function(e, n, t) {
- t.r(n);
- var i = t(510), a = t.n(i);
- for (var u in i) "default" !== u && function(e) {
- t.d(n, e, function() {
- return i[e];
- });
- }(u);
- n.default = a.a;
- },
- 510: function(e, n, t) {}
- } ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "components/uni-number-box-create-component", {
- "components/uni-number-box-create-component": function(e, n, t) {
- t("1").createComponent(t(504));
- }
- }, [ [ "components/uni-number-box-create-component" ] ] ]);
|