For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/zh/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/zh/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/zh/components/rate.md.
v0.0.57
  • 简体中文
  • Rate

    数据录入@rockshin/tao-ui

    支持整星和半星选择的评分组件。

    何时使用

    用于简短的有序评分,提供可见标签并说明高分与低分含义。

    示例

    受控半星评分

    方向键调整评分。allowHalf 启用半星,tooltips 可说明整星分值。

    390 × 640
    TSX

    允许或禁止清空

    allowClear 开启时,再次点击已选分值可清空为 0。

    Click the selected star to clear

    A value is always retained

    TSX

    只读与禁用

    readOnly 展示已有评分,disabled 表示当前不可操作。

    Average: 4.5

    Rating unavailable

    TSX

    自定义字符与数量

    character 可传入节点或按序号返回节点的函数。

    • ♥
      ♥
    • ♥
      ♥
    • ♥
      ♥
    • 1
      1
    • 2
      2
    • 3
      3
    • 4
      4
    • 5
      5
    TSX

    尺寸与全局默认值

    支持 small、middle、large,也支持原生 medium 写法。

    TSX

    焦点与语义定制

    其他操作需要将焦点移至评分时,可通过 ref 调用 focus。

    TSX

    API

    Rate

    属性说明类型默认值