Browse Source

BI-59128 style:不允许小数时修改错误提示文案

master
Tangjinxia 4 years ago
parent
commit
ca740ca88a
  1. 10
      src/widget/singleslider/singleslider.js

10
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));

Loading…
Cancel
Save