Commit 6cd01c26 authored by kingwl's avatar kingwl Committed by FuryBean

InputNumber: fix invalid value (#1330)

parent 066eaf12
...@@ -175,15 +175,17 @@ ...@@ -175,15 +175,17 @@
return (arg1 + arg2) / m; return (arg1 + arg2) / m;
}, },
increase() { increase() {
if (this.value + this.step > this.max || this.disabled) return; const value = this.value || 0;
this.currentValue = this.accAdd(this.step, this.value); if (value + this.step > this.max || this.disabled) return;
this.currentValue = this.accAdd(this.step, value);
if (this.maxDisabled) { if (this.maxDisabled) {
this.inputActive = false; this.inputActive = false;
} }
}, },
decrease() { decrease() {
if (this.value - this.step < this.min || this.disabled) return; const value = this.value || 0;
this.currentValue = this.accSub(this.value, this.step); if (value - this.step < this.min || this.disabled) return;
this.currentValue = this.accSub(value, this.step);
if (this.minDisabled) { if (this.minDisabled) {
this.inputActive = false; this.inputActive = false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment