Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including uxcore-pagination with all npm packages installed. Try it out:

var uxcorePagination = require("uxcore-pagination")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

uxcore-pagination v0.7.6

pagination ui component for react

uxcore-pagination

pagination ui component for react
NPM version build status Test Coverage Dependency Status devDependency Status NPM downloads Sauce Test Status

setup develop environment

$ git clone https://github.com/uxcore/uxcore-pagination
$ cd uxcore-pagination
$ npm install
$ npm start

Usage

var Pagination = require('uxcore-pagination');
React.render(
    <Pagination onChange={onChange} total={50} />, document.getElementById('target'));

demo

http://uxcore.github.io/uxcore/components/pagination/

API

Props

参数说明类型默认值
locale语言(zh-cn/en-us)stringzh-cn
current当前页数number1
total数据总数number/jsx0
pageSize每页条数number10
onChange页码改变的回调,参数是改变后的页码functionnoop
showTotal是否显示共多少条booleanfalse
showQuickJumper是否可以快速跳转至某页boolfalse
showSizeChanger是否可以改变 pageSizeboolfalse
sizeOptionssizeChanger 显示的可选 pageSizearray[10, 20, 30, 40]
onShowSizeChangepageSize 变化的回调functionnoop
className当为「mini」时,是小尺寸分页string
simple当添加该属性时,显示为简单分页object
getSelectPopupContainer指定下拉选择框渲染的容器function():HTML Element插在 body 下的一个 div

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free