Merge remote-tracking branch 'baidu/master'

This commit is contained in:
2betop 2022-06-29 16:10:28 +08:00
commit b80057ba66
2 changed files with 3 additions and 1 deletions

View File

@ -156,6 +156,7 @@
border-radius: 50%;
background-color: var(--InputRange-track-dot-bg);
position: absolute;
transform: translateX(-50%);
}
}

View File

@ -444,7 +444,8 @@ export class Range extends React.Component<RangeItemProps, any> {
if (isString(value) && MARKS_REG.test(value)) {
return value;
}
return (+value * 100) / (max - min) + '%';
value = Math.min(Math.max(+value, min), max);
return ((value - min) * 100) / (max - min) + '%';
}
render() {