From 22fc347bedaef518868d5adc9c004030572561bc Mon Sep 17 00:00:00 2001 From: Klein Date: Tue, 2 Jul 2024 18:29:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(range):=20=E4=BF=AE=E5=A4=8D=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20step=20=E6=97=B6=E6=9C=AA=E8=80=83=E8=99=91=20min?= =?UTF-8?q?=20=E5=80=BC=E7=9A=84=E5=A4=84=E7=90=86=20(#3111)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: daiwanxing --- src/packages/__VUE/range/index.taro.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages/__VUE/range/index.taro.vue b/src/packages/__VUE/range/index.taro.vue index 01e212f63f..c87bf6f942 100644 --- a/src/packages/__VUE/range/index.taro.vue +++ b/src/packages/__VUE/range/index.taro.vue @@ -272,7 +272,7 @@ export default create({ const format = (value: number) => { const { min, max, step } = props value = Math.max(+min, Math.min(value, +max)) - return Math.round(value / +step) * +step + return Math.round((value - +min) / +step) * +step + +min } const isSameValue = (newValue: SliderValue, oldValue: SliderValue) =>