From 7a2c999e2b2a3c47d7413eea3cc7a95f5c054481 Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 5 Jan 2023 14:33:13 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-87959=20fix:=20BI.NumberEditor=E8=B6=85?= =?UTF-8?q?=E5=87=BA=E8=8C=83=E5=9B=B4=E9=9C=80=E8=A6=81=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E5=BE=AE=E8=B0=83=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/numbereditor/number.editor.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/widget/numbereditor/number.editor.js b/src/widget/numbereditor/number.editor.js index 2624c5dc4..a2136bb10 100644 --- a/src/widget/numbereditor/number.editor.js +++ b/src/widget/numbereditor/number.editor.js @@ -137,8 +137,11 @@ BI.NumberEditor = BI.inherit(BI.Widget, { // 微调 _finetuning: function (add) { - var v = BI.parseFloat(this.getValue()); - this.setValue(BI.add(v, add)); + const { max, min } = this.options; + let v = BI.parseFloat(this.getValue()); + v = BI.add(v, add); + v = BI.clamp(v, min, max); + this.setValue(v); }, setUpEnable: function (v) { @@ -165,7 +168,8 @@ BI.NumberEditor = BI.inherit(BI.Widget, { var o = this.options; o.value = v; this.editor.setValue(o.valueFormatter(v)); - } + this._checkAdjustDisabled(o.value); + }, }); BI.NumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM";