SliderProps
Defined in: packages/ui-core/src/components/slider.tsx:3
Extends
Section titled “Extends”Omit<React.InputHTMLAttributes<HTMLInputElement>,"type">
Properties
Section titled “Properties”showValue?
Section titled “showValue?”
optionalshowValue?:boolean
Defined in: packages/ui-core/src/components/slider.tsx:5
显示当前值与范围标签(渲染在滑块上方)
format?
Section titled “format?”
optionalformat?: (value) =>string
Defined in: packages/ui-core/src/components/slider.tsx:7
自定义值格式化(如百分比 / 单位)
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”string
onValueChange?
Section titled “onValueChange?”
optionalonValueChange?: (value) =>void
Defined in: packages/ui-core/src/components/slider.tsx:13
便捷回调:仅传数值,免去从 e.target.value 手动解包。
与 onChange(原生事件回调)可同时使用,二者都会触发。
推荐用此 prop 处理业务逻辑,onChange 仅在需要原生事件对象时使用。
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void