Rate

Use and Import

import Rate from 'nes-design/es/Rate';   OR   import { Rate } from 'nes-design';
Copy

Case

Rate

AllowClear / False

AllowClear Attribute / if value change disabled will change true

disabled

Icon Half

only icon('heart' | 'start') support half

Hover Change

Props

Prop / 参数Description / 描述Type / 类型Default / 默认值
iconRate icon / iconIconsstar
allowClearcontinue to change after the state change / 状态改变后是否还能继续改变booleantrue
allowHalfis support half / 是否支持半选booleantrue
countrate count / 评星的数量number5
defaultValuerate defaultValue / 默认选中的值number-
disableddisabledboolean-
valuerate value / 评星的值number-
emptyTypeempty status type / 未选中情况下未选中的样式类型'transparent' | 'normal'transparent
onHoverChangehover change callback / hover 改变的回调(value: number) => void;-
onChangeclick change callback / click 改变的回调(value: number) => void;-
...restmore attrs / 更多属性React.HTMLAttributes<HTMLElement>-