From d1357ed07e4ca1480e5c6d065762dc5ca8c77f93 Mon Sep 17 00:00:00 2001 From: treecat <2184452844@qq.com> Date: Sun, 3 Dec 2023 18:48:37 +0800 Subject: [PATCH] =?UTF-8?q?BI-139664=20fix:=E6=BB=91=E5=9D=97=E7=BB=84?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/widget/intervalslider/intervalslider.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/packages/fineui/src/widget/intervalslider/intervalslider.js b/packages/fineui/src/widget/intervalslider/intervalslider.js index 413fa78ad..63c1af7b8 100644 --- a/packages/fineui/src/widget/intervalslider/intervalslider.js +++ b/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%", + 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) {