fix(slider): slider range select bug (#390) (#518)

Co-authored-by: chenguang <guang_chen@huacenav.com>
This commit is contained in:
Spark Bill 2023-09-27 21:27:44 +08:00 committed by GitHub
parent 0036fcb203
commit eec4713a35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -213,6 +213,9 @@ export const getActiveButtonIndex =
}
const calcCurrentValue = ({ currentValue, props, state }) => {
if(Array.isArray(currentValue)){
currentValue = currentValue[state.activeIndex]
}
if (currentValue <= props.min) {
currentValue = props.min
} else if (currentValue >= props.max) {