Browse Source

BI-116019 fix: 【6.0.4冒烟】区间滑块不绑定字段,鼠标悬浮组件应该会有提示

es6
zsmj 2 years ago
parent
commit
128c819e83
  1. 2
      demo/js/config/widget.js
  2. 19
      src/widget/intervalslider/intervalslider.js

2
demo/js/config/widget.js

@ -192,7 +192,7 @@ Demo.WIDGET_CONFIG = [{
value: "demo.number_interval"
}, {
id: 420,
text: "滚动sliders",
text: "数值滑块sliders",
value: "demo.slider"
}, {
pId: 4,

19
src/widget/intervalslider/intervalslider.js

@ -26,7 +26,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
beforeMount: function () {
const { value, min, max } = this.options;
this.setMinAndMax({
this._setMinAndMax({
min,
max,
});
@ -260,12 +260,12 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
items: [
{
el: this.sliderOne,
top: 1,
top: 0,
bottom: 0,
left: 0
}, {
el: this.sliderTwo,
top: 1,
top: 0,
bottom: 0,
left: "100%"
}
@ -487,22 +487,23 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
},
setMinAndMax: function (v) {
_setMinAndMax: function (v) {
var minNumber = BI.parseFloat(v.min);
var maxNumber = BI.parseFloat(v.max);
if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber >= minNumber )) {
if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber >= minNumber)) {
this.min = minNumber;
this.max = maxNumber;
this.valueOne = minNumber;
this.valueTwo = maxNumber;
this.precision = this._getPrecision();
this.setEnable(true);
}
if (maxNumber === minNumber) {
this.setEnable(false);
}
},
setMinAndMax: function (v) {
this._setMinAndMax(v);
this.setEnable(v.min <= v.max);
},
setValue: function (v) {
var o = this.options;
var valueOne = BI.parseFloat(v.min);

Loading…
Cancel
Save