fix(components): [slider] data anomaly when the input value is undefined (#15402)

fix(components): [slider] data anomaly

Co-authored-by: qiang <qw13131wang@gmail.com>
This commit is contained in:
betavs
2024-07-29 15:20:04 +08:00
committed by GitHub
parent c76cc8bc92
commit a2323f0bb3

View File

@@ -113,8 +113,10 @@ export const useSlide = (
}
const setFirstValue = (firstValue: number | undefined) => {
initData.firstValue = firstValue!
_emit(props.range ? [minValue.value, maxValue.value] : firstValue!)
initData.firstValue = firstValue ?? props.min
_emit(
props.range ? [minValue.value, maxValue.value] : firstValue ?? props.min
)
}
const setSecondValue = (secondValue: number) => {