# Rate 评分
# API
# Attributes
| 参数 | 说明 | 类型 | 可选值 | 默认值 | Version |
|---|---|---|---|---|---|
| allow-half | 是否允许半选 | Boolean | — | false | |
| colors | icon 的颜色。若传入数组,共有 3 个元素,为 3 个分段所对应的颜色;若传入对象,可自定义分段,键名为分段的界限值,键值为对应的颜色 | Array | Object | — | ['#FF8C00', '#FF8C00', '#FF8C00'] | |
| disabled | 是否为只读 | Boolean | — | false | |
| disabled-void-color | 只读时未选中 icon 的颜色 | String | — | '#c9c9c9' | |
| disabled-void-icon-class | 只读时未选中 icon 的类名 | String | — | 'w-icon-star-solid' | |
| high-threshold | 高分和中等分数的界限值,值本身被划分在高分中 | Number | — | 4 | |
| icon-classes | icon 的类名。若传入数组,共有 3 个元素,为 3 个分段所对应的类名;若传入对象,可自定义分段,键名为分段的界限值,键值为对应的类名 | Array | Object | — | ['w-icon-star-solid', 'w-icon-star-solid', 'w-icon-star-solid'] | |
| low-threshold | 低分和中等分数的界限值,值本身被划分在低分中 | Number | — | 2 | |
| max | 最大分值 | Number | — | 5 | |
| show-text | 是否显示辅助文字,若为真,则会从 texts 数组中选取当前分数对应的文字内容 | Boolean | — | false | |
| show-score | 是否显示当前分数,show-score 和 show-text 不能同时为真 | Boolean | — | false | |
| score-template | 分数显示模板 | String | — | {value} | |
| text-color | 辅助文字的颜色 | String | — | '#000' | |
| texts | 辅助文字数组 | Array | — | ['极差', '失望', '一般', '满意', '惊喜'] | |
| void-icon-class | 未选中 icon 的类名 | String | — | 'w-icon-mark' | |
| void-color | 未选中 icon 的颜色 | String | — | '#e9e9e9' | |
| value / v-model | 绑定值 | Number | — | 0 |
# Events
| 事件名称 | 说明 | 回调参数 | Version |
|---|---|---|---|
| change | 分值改变时触发 | 改变后的分值 |