Browse Source

BI-139664 fix:滑块组件

research/test
treecat 12 months ago
parent
commit
d1357ed07e
  1. 13
      packages/fineui/src/widget/intervalslider/intervalslider.js

13
packages/fineui/src/widget/intervalslider/intervalslider.js

@ -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%",
});
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) {

Loading…
Cancel
Save