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/statistic.md.
v0.0.57
  • 简体中文
  • Statistic

    数据展示@rockshin/tao-ui

    突出展示数值、格式化指标与计时。

    组件采用 tao-ui 原生实现,公共 API 对齐 Ant Design 6.7.0。外观、主题 token 与 Semantic DOM 定制遵循 tao-ui,主题通过 TaoProvider 配置。

    数字字符串保留大数精度;precision 截取小数位。Timer 支持倒计时与正计时,并保留旧 Countdown 别名。

    何时使用

    提供清晰标题与单位,使数值不依赖额外上下文也能理解。

    代码演示

    数值与单位

    Active users
    12,345
    Completion
    93.5%
    Balance
    $1,842.60
    TSX

    精度与分隔符

    Precise string
    12,345,678,901,234,567,890.98
    Custom grouping
    1 234 567,89
    TSX

    自定义格式与数值渲染

    Storage used
    1.5 GB
    TSX

    加载状态

    Monthly total
    TSX

    倒计时与完成反馈

    Time remaining
    -

    Running

    TSX

    已用时间

    Session duration
    -
    TSX

    地区格式

    地区分组、小数符号和数字字符继承 TaoProvider.locale.numberLocale,也可用组件 locale="fr-FR" 覆盖。显式分隔符和自定义 formatter 优先;数字输入在本地化显示的同时保留规范 ASCII 字符串及精度。

    API

    Statistic

    属性说明类型默认值
    localeBCP 47 locale. Defaults to the provider's number locale.string | undefined-