|
|
|
@ -388,27 +388,18 @@ export class IntervalSlider extends Single {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 别删,历史原因,定时调度不能用 element.children 函数
|
|
|
|
|
_getElementFirstChild(parentElement) { |
|
|
|
|
return parentElement.children()[0] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_resetLabelPosition(needReverse) { |
|
|
|
|
const { lAlign, rAlign } = this.options; |
|
|
|
|
|
|
|
|
|
this.labelOne.element.css({ |
|
|
|
|
left: needReverse ? "unset" : "0%", |
|
|
|
|
right: needReverse ? "0%" : "unset", |
|
|
|
|
}); |
|
|
|
|
this._getElementFirstChild(this.labelOne.element) |
|
|
|
|
?.labelOneChild.css({ textAlign: needReverse ? rAlign : lAlign }); |
|
|
|
|
|
|
|
|
|
this.labelOne.element.children()[0] && (this.labelOne.element.children()[0].style.textAlign = needReverse ? rAlign : lAlign); |
|
|
|
|
this.labelTwo.element.css({ |
|
|
|
|
left: needReverse ? "0%" : "unset", |
|
|
|
|
right: needReverse ? "unset" : "0%", |
|
|
|
|
left: needReverse ? "0%" : "unset", |
|
|
|
|
right: needReverse ? "unset" : "0%", |
|
|
|
|
}); |
|
|
|
|
this._getElementFirstChild(this.labelTwo.element) |
|
|
|
|
?.css({ textAlign: needReverse ? lAlign : rAlign }); |
|
|
|
|
this.labelTwo.element.children()[0] && (this.labelTwo.element.children()[0].style.textAlign = needReverse ? lAlign : rAlign); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_setSliderOnePosition(percent) { |
|
|
|
|