import Rate from 'nes-design/es/Rate'; OR import { Rate } from 'nes-design';
AllowClear Attribute / if value change disabled will change true
only icon('heart' | 'start') support half
Prop / 参数 | Description / 描述 | Type / 类型 | Default / 默认值 |
---|---|---|---|
icon | Rate icon / icon | Icons | star |
allowClear | continue to change after the state change / 状态改变后是否还能继续改变 | boolean | true |
allowHalf | is support half / 是否支持半选 | boolean | true |
count | rate count / 评星的数量 | number | 5 |
defaultValue | rate defaultValue / 默认选中的值 | number | - |
disabled | disabled | boolean | - |
value | rate value / 评星的值 | number | - |
emptyType | empty status type / 未选中情况下未选中的样式类型 | 'transparent' | 'normal' | transparent |
onHoverChange | hover change callback / hover 改变的回调 | (value: number) => void; | - |
onChange | click change callback / click 改变的回调 | (value: number) => void; | - |
...rest | more attrs / 更多属性 | React.HTMLAttributes<HTMLElement> | - |