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

    导航@rockshin/tao-ui

    在较大数据集合的分页之间导航。

    何时使用

    列表或表格无法一次有效展示全部结果时使用 Pagination。

    推荐

    • 在数据变化时保持当前页有效。
    • 需要时展示总数和每页数量。

    避免

    • 少量内容不需要分页。

    代码演示

    基础用法

    TSX

    尺寸

    TSX

    每页数量与总数

    TSX

    显示数据总量

    showTotal 可以展示当前记录区间与总数量。

    TSX

    切换每页条数

    将页码和每页数量一起维护,数据请求应使用变更后的两个值。

    TSX

    分页尺寸

    尺寸影响分页按钮的密度,可与所在列表或表格匹配。

    TSX

    API

    Pagination

    属性说明类型默认值
    disabled是否禁用boolean | undefined-
    className节点类名string | undefined-