fix(slider): fix incorrect placement of dot

pull/8169/head
ayang 2025-05-13 19:09:53 +08:00
parent aa211fd789
commit 241461cc57
No known key found for this signature in database
GPG Key ID: 7CF0B972091D5C0C
1 changed files with 2 additions and 2 deletions

View File

@ -53,8 +53,8 @@ const Steps = (_: any, { attrs }) => {
(!included && point === upperBound) || (!included && point === upperBound) ||
(included && point <= upperBound && point >= lowerBound); (included && point <= upperBound && point >= lowerBound);
let style = vertical let style = vertical
? { ...dotStyle, [reverse ? 'top' : 'bottom']: offset } ? { ...dotStyle, [reverse ? 'top' : 'bottom']: offset, transform: 'translateY(50%)' }
: { ...dotStyle, [reverse ? 'right' : 'left']: offset }; : { ...dotStyle, [reverse ? 'right' : 'left']: offset, transform: 'translateX(-50%)' };
if (isActived) { if (isActived) {
style = { ...style, ...activeDotStyle }; style = { ...style, ...activeDotStyle };
} }