From 71adf0adcdf2f3f21047c050526ec301be8cd5ed Mon Sep 17 00:00:00 2001 From: Tangjinxia <1119518763@qq.com> Date: Mon, 14 Sep 2020 18:09:23 +0800 Subject: [PATCH] =?UTF-8?q?BI-59128=20style:=E5=8D=95=E5=80=BC=E6=BB=91?= =?UTF-8?q?=E5=9D=97=E9=94=99=E8=AF=AF=E8=AF=AD=E5=8F=A5=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/singleslider/singleslider.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/widget/singleslider/singleslider.js b/src/widget/singleslider/singleslider.js index eb0a700c7..df1c958d6 100644 --- a/src/widget/singleslider/singleslider.js +++ b/src/widget/singleslider/singleslider.js @@ -16,7 +16,8 @@ BI.SingleSlider = BI.inherit(BI.Single, { props: { baseCls: "bi-single-slider bi-slider-track", digit: false, - unit: "" + unit: "", + errorText: "" }, render: function () { @@ -315,14 +316,18 @@ BI.SingleSlider = BI.inherit(BI.Single, { this.min = 0; this.max = 0; this._setBlueTrack(0); - }, populate: function () { + var o = this.options; if (!isNaN(this.min) && !isNaN(this.max)) { this._setVisible(true); this.enable = true; - this.label.setErrorText(BI.i18nText("BI-Basic_Please_Enter_Number_Between", this.min, this.max)); + if (BI.isNotEmptyString(o.errorText)) { + this.label.setErrorText(o.errorText); + } else { + this.label.setErrorText(BI.i18nText("BI-Basic_Please_Enter_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));