Skip to content

Pagination 分页器


用于展示页码、请求数据等。

使用指南

在 Taro 文件中引入组件

js
import { AtPagination } from 'taro-ui'

组件依赖的样式文件(仅按需引用时需要)

scss
@import '~taro-ui/dist/style/components/pagination.scss';
@import '~taro-ui/dist/style/components/button.scss';
@import '~taro-ui/dist/style/components/icon.scss';

用法

html
<AtPagination total="{50}" pageSize="{10}" current="{1}"> </AtPagination>

<AtPagination icon total="{50}" pageSize="{10}" current="{1}"> </AtPagination>

Pagination 参数

参数说明类型可选值默认值
current当前页Number-1
total数据总量Number-0
pageSize每页数据量Number-20
icon是否以 icon 形式展示按钮Boolean-false

Pagination 事件

事件名称说明返回参数
onPageChange点击页码按钮时触发type, current

Released under the MIT License.