Browse Source

小数位数

es6
windy 5 years ago
parent
commit
52a569fc00
  1. 5
      src/widget/intervalslider/intervalslider.js

5
src/widget/intervalslider/intervalslider.js

@ -514,13 +514,14 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
}, },
populate: function () { populate: function () {
var o = this.options;
if (!isNaN(this.min) && !isNaN(this.max)) { if (!isNaN(this.min) && !isNaN(this.max)) {
this.enable = true; this.enable = true;
this._setVisible(true); this._setVisible(true);
this._setErrorText(); this._setErrorText();
if ((BI.isNumeric(this.valueOne) || BI.isNotEmptyString(this.valueOne)) && (BI.isNumeric(this.valueTwo) || BI.isNotEmptyString(this.valueTwo))) { if ((BI.isNumeric(this.valueOne) || BI.isNotEmptyString(this.valueOne)) && (BI.isNumeric(this.valueTwo) || BI.isNotEmptyString(this.valueTwo))) {
this.labelOne.setValue(this.valueOne); this.labelOne.setValue(o.digit === false ? this.valueOne : BI.parseFloat(this.valueOne).toFixed(o.digit));
this.labelTwo.setValue(this.valueTwo); this.labelTwo.setValue(o.digit === false ? this.valueTwo : BI.parseFloat(this.valueTwo).toFixed(o.digit));
this._setAllPosition(this._getPercentByValue(this.valueOne), this._getPercentByValue(this.valueTwo)); this._setAllPosition(this._getPercentByValue(this.valueOne), this._getPercentByValue(this.valueTwo));
} else { } else {
this.labelOne.setValue(this.min); this.labelOne.setValue(this.min);

Loading…
Cancel
Save