From ca740ca88af864b32db1f7481b4562a0e1a7eff2 Mon Sep 17 00:00:00 2001 From: Tangjinxia <1119518763@qq.com> Date: Tue, 15 Sep 2020 15:33:35 +0800 Subject: [PATCH] =?UTF-8?q?BI-59128=20style:=E4=B8=8D=E5=85=81=E8=AE=B8?= =?UTF-8?q?=E5=B0=8F=E6=95=B0=E6=97=B6=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/singleslider/singleslider.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/widget/singleslider/singleslider.js b/src/widget/singleslider/singleslider.js index df1c958d60..12aba01960 100644 --- a/src/widget/singleslider/singleslider.js +++ b/src/widget/singleslider/singleslider.js @@ -16,8 +16,7 @@ BI.SingleSlider = BI.inherit(BI.Single, { props: { baseCls: "bi-single-slider bi-slider-track", digit: false, - unit: "", - errorText: "" + unit: "" }, render: function () { @@ -323,11 +322,12 @@ BI.SingleSlider = BI.inherit(BI.Single, { if (!isNaN(this.min) && !isNaN(this.max)) { this._setVisible(true); this.enable = true; - if (BI.isNotEmptyString(o.errorText)) { - this.label.setErrorText(o.errorText); - } else { + if (o.digit) { this.label.setErrorText(BI.i18nText("BI-Basic_Please_Enter_Number_Between", this.min, this.max)); + } else { + this.label.setErrorText(BI.i18nText("BI-Basic_Please_Enter_Integer_Number_Between", this.min, this.max)); } + if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) { this.label.setValue(this.value); this._setAllPosition(this._getPercentByValue(this.value));