# Rate 评分

rate

# 规则

{
    type: 'rate',
    title: '评分',
    field: 'rate',
    value: 5,
    props: {
        disabled: false,
    }
}

参考:Vant_Rate (opens new window)

value :Number

# Props

参数 说明 类型 默认值
count 图标总数 number | string 5
size 图标大小,默认单位为px number | string 20px
gutter 图标间距,默认单位为px number | string 4px
color 选中时的颜色 string #ee0a24
void-color 未选中时的颜色 string #c8c9cc
disabled-color 禁用时的颜色 string #c8c9cc
icon 选中时的图标名称或图片链接,等同于 Icon 组件的 name 属性 (opens new window) string star
void-icon 未选中时的图标名称或图片链接,等同于 Icon 组件的 name 属性 (opens new window) string star-o
icon-prefix 图标类名前缀,等同于 Icon 组件的 class-prefix 属性 (opens new window) string van-icon
allow-half 是否允许半选 boolean false
clearable 是否允许再次点击后清除 boolean false
readonly 是否为只读状态,只读状态下无法修改评分 boolean false
disabled 是否禁用评分 boolean false
touchable 是否可以通过滑动手势选择评分 boolean true

# Events

事件名 说明 回调参数
change 当前分值变化时触发的事件 currentValue: number