Browse Source

Merge pull request #1200 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit '5eb78f65aceffd1de9776ff0b4c0d30cc8283551':
  changelog
  BI-56574 fix: setValue之后,populate需要刷新label
es6
windy 5 years ago
parent
commit
f090a3c7fa
  1. 1
      changelog.md
  2. 13
      src/widget/intervalslider/intervalslider.js

1
changelog.md

@ -1,5 +1,6 @@
# 更新日志
2.0(2019-12)
- 修复了数值滑块逆向排列滑块后populate显示效果不对的问题
- 不影响父节点勾选状态的复选树支持自定义水印和默认值
2.0(2019-11)

13
src/widget/intervalslider/intervalslider.js

@ -334,11 +334,15 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
valueTwo = BI.parseFloat(valueTwo);
if((oldValueOne <= oldValueTwo && valueOne > valueTwo) || (oldValueOne >= oldValueTwo && valueOne < valueTwo)) {
var isSliderOneLeft = BI.parseFloat(this.sliderOne.element[0].style.left) < BI.parseFloat(this.sliderTwo.element[0].style.left);
this.labelOne.element.css({left: isSliderOneLeft ? "0%" : "100%"});
this.labelTwo.element.css({left: isSliderOneLeft ? "100%" : "0%"});
this._resetLabelPosition(!isSliderOneLeft);
}
},
_resetLabelPosition: function(needReverse) {
this.labelOne.element.css({left: needReverse ? "100%" : "0%"});
this.labelTwo.element.css({left: needReverse ? "0%" : "100%"});
},
_setSliderOnePosition: function (percent) {
this.sliderOne.element.css({left: percent + "%"});
},
@ -481,8 +485,8 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
var o = this.options;
var valueOne = BI.parseFloat(v.min);
var valueTwo = BI.parseFloat(v.max);
valueOne = o.digit === false ? valueOne : valueOne.toFixed(o.digit);
valueTwo = o.digit === false ? valueTwo : valueTwo.toFixed(o.digit);
valueOne = o.digit === false ? valueOne : BI.parseFloat(valueOne.toFixed(o.digit));
valueTwo = o.digit === false ? valueTwo : BI.parseFloat(valueTwo.toFixed(o.digit));
if (!isNaN(valueOne) && !isNaN(valueTwo)) {
if (this._checkValidation(valueOne)) {
this.valueOne = (this.valueOne <= this.valueTwo ? valueOne : valueTwo);
@ -523,6 +527,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
this.labelTwo.setValue(this.max);
this._setAllPosition(0, 100);
}
this._resetLabelPosition();
}
}
});

Loading…
Cancel
Save