组件
评分
用于评分的星级控件。
用法
基础
HTML
<bs:bsui-rating max="5" defaultValue="4" />十分制
超出常见的五星范围,适合范围更大的调查。
HTML
<bs:bsui-rating name="score" max="10" defaultValue="7" />等待输入
字段初始为空,下方说明评分范围。
HTML
<bs:bsui-field>
<bs:bsui-field-label text="How was your support experience?" />
<bs:bsui-rating name="support_rating" max="5" defaultValue="0" />
<bs:bsui-field-description text="One star is poor, five stars is excellent." />
</bs:bsui-field>只读
已禁用的评分控件会报告分数,而不是收集评分。
HTML
<bs:bsui-rating max="5" defaultValue="4" disabled="true" />属性
| 属性 | 类型 | 默认 |
|---|---|---|
name | text | — |
max | number | 5 |
defaultValue | number | 0 |
disabled | toggle | false |
nameAlt | text | — |
onChange | text | — |
value | text | — |