From 006b283aef967c2d23099c37a40ef6e0ee4290fd Mon Sep 17 00:00:00 2001 From: wangyao <904190290@qq.com> Date: Mon, 25 Sep 2023 14:28:25 +0800 Subject: [PATCH] fixed#4194:The maximum value of the slider conflicts with the input value Signed-off-by: wangyao <904190290@qq.com> --- src/components/Inputs/UnitSlider/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Inputs/UnitSlider/index.jsx b/src/components/Inputs/UnitSlider/index.jsx index 8bdc017b554..d2c7a412ea4 100644 --- a/src/components/Inputs/UnitSlider/index.jsx +++ b/src/components/Inputs/UnitSlider/index.jsx @@ -22,7 +22,7 @@ import { Slider } from '@kube-design/components' export default class UnitSlider extends React.Component { handleChange = value => { const { onChange, unit } = this.props - let newValue = value + let newValue = Number(value.split(unit)[0]) > 2048 ? `2048${unit}` : value; if (unit && String(value).indexOf(unit) < 0) { newValue = `${value}${unit}` }