1.0.10 • Published 2 years ago
react-hook-pagenation v1.0.10
使用react-hooks开发的分页组件 a react pagenation component used reack-hooks.
🏠 Homepage
Install
npm i react-hook-pagenation
Usage
import Pagenation from 'react-hook-pagenation';
import 'react-hook-pagenation/lib/main.min.css';
<Pagenation currentPage={currentPage} pageSize={pageSize} pageSizeOptions={pageSizeOptions} total={total} handleChangePage={handleChangePage} handleChangePageSize={handleChangePageSize}></Pagenation>
APIs
参数(argument) | 类型(type) | 释义(mean) | 是否必选(required) |
---|---|---|---|
currentPage | number | 当前分页 | YES |
pageSize | number | 分页大小 | NO |
pageSizeOptions | arraynumber | 分页选项 | NO |
total | number | 总数 | YES |
totalText | string | 自定义总数文案 | NO |
handleChangePage | function | 切换分页 | YES |
handleChangePageSize | function | 切换分页大小 | NO |
Demo
参考example/src
目录。
see example/src
.
Author
👤 flymoth
- Website: flymoth.github.io
- Github: @flymoth
🤝 Contributing
Contributions, issues and feature requests are welcome!Feel free to check issues page. You can also take a look at the contributing guide.
Show your support
Give a ⭐️ if this project helped you!
📝 License
Copyright © 2022 flymoth. This project is MIT licensed.
This README was generated with ❤️ by readme-md-generator