New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bee-pagination-ac

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bee-pagination-ac

pagination ui component for react

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

bee-pagination

npm version Build Status Coverage Status

用于内容过多,分页显示内容

Pagination组件内部集成了子组件PaginationButton.PaginationButton并不暴露给用户。

使用

使用单独的bee-Pagination包

组件引入

先进行下载bee-Pagination包

npm install --save bee-pagination

组件调用

import Pagination from 'bee-pagination';
React.render(<div>
   <Pagination
        prev
        next
        first
        last
        ellipsis
        boundaryLinks
        items={20}
        maxButtons={5}
        activePage={this.state.activePage}
        onSelect={this.handleSelect.bind(this)} />
</div>, document.getElementById('target'));
样式引入
  • 可以使用link引入dist目录下bee-pagination.css
<link rel="stylesheet" href="./node_modules/build/Pagination.css">
  • 可以在js中import样式
import "./node_modules/src/Pagination.scss"
//或是
import "./node_modules/build/Pagination.css"

API

参数说明类型默认值
items总页数number1
activePage哪一页是激活状态number1
onSelect切换页的方法func() => {}
maxButtons显示最多页数按钮number0
prev显示上一页按钮boolfalse
next显示下一页按钮boolfalse
first显示第一页按钮boolfalse
last显示最后一页按钮boollast
ellipsis显示省略按钮boolfalse
boundaryLinks显示边界按钮boolfalse
gap按钮之间有间隔booltrue
noBorder不显示按钮边框boolfalse
size分页按钮大小(lg md sm)string'sm'
showJump是否显示跳页选择boolfalse(为了兼容老版本)
onDataNumSelect选择每页多少条的回调函数func() => {}
dataNumSelect每页多少条的下拉选择Option内容array['5','10','15','20']
dataNum下拉选择的设定值的indexnum1
total一共多少条num1
disabledpagination不可用,不可点击boolfalse
confirmBtn渲染确认按钮dom的方法func() => {}
开发调试
$ git clone https://github.com/tinper-bee/bee-pagination
$ cd bee-pagination
$ npm install
$ npm run dev

Keywords

FAQs

Package last updated on 27 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc