Skip to content

Commit ddcbd43

Browse files
committed
已修改 README.md
Add .gitignore Add docs/index.html Add docs/static/css/index.a46d9cf2.css Add docs/static/css/index.a46d9cf2.css.map Add docs/static/js/index.0853f3d2.js Add docs/static/js/index.0853f3d2.js.map Add docs/static/js/vendors.226cb6a9.chunk.js Add docs/static/js/vendors.226cb6a9.chunk.js.map Add examples/Demo.js Add examples/DemoList.js Add examples/demos/demo1.js Add examples/index.html Add examples/index.js Add examples/style/animate.scss Add examples/style/index.scss Add lib/index.js Add lib/style/index.css Add package-lock.json Add package.json Add src/index.js Add src/style/index.scss
1 parent 1f09603 commit ddcbd43

22 files changed

+42670
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules

README.md

+74-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,74 @@
1-
# pagination
2-
pagination
1+
# react-widget-pagination
2+
3+
## Install
4+
5+
`npm install --save react-widget-pagination`
6+
7+
8+
## Options
9+
10+
```
11+
static propTypes = {
12+
className: PropTypes.string,
13+
prefixCls: PropTypes.string,
14+
small: PropTypes.bool,
15+
total: PropTypes.number.isRequired,
16+
defaultCurrent: PropTypes.number,
17+
current: PropTypes.number,
18+
defaultPageSize: PropTypes.number,
19+
pageSize: PropTypes.number,
20+
pageRange: PropTypes.number,
21+
pageSizeOptions: PropTypes.array,
22+
onPageSizeChange: PropTypes.func,
23+
onChange: PropTypes.func,
24+
layout: PropTypes.array,
25+
totalRender: PropTypes.func,
26+
prevBtnRender: PropTypes.func,
27+
nextBtnRender: PropTypes.func,
28+
itemRender: PropTypes.func,
29+
pageSizeOptionRender: PropTypes.func,
30+
jumperRender: PropTypes.func,
31+
showPrevMore: PropTypes.bool,
32+
showNextMore: PropTypes.bool,
33+
selectComponent: PropTypes.any,
34+
};
35+
36+
static defaultProps = {
37+
prefixCls: 'rw-pagination',
38+
small: false,
39+
total: 0,
40+
showSizeChanger: false,
41+
pageSizeOptions: [10, 20, 30, 40],
42+
pageRange: 5,//必须是奇数,界面上最多显示7页
43+
//total, sizes, prev, pager, next, jumper
44+
layout: ['total', 'sizes', 'prev', 'pager', 'next', 'jumper'],
45+
totalRender: function (total, pn, ps) {
46+
return `共 ${total} 条`;
47+
},
48+
pageSizeOptionRender: function (v) {
49+
return `${v} 条/页`;
50+
},
51+
jumperRender: null,
52+
prevBtnRender: () => '上一页',
53+
nextBtnRender: () => '下一页',
54+
itemRender: null,
55+
showPrevMore: true,
56+
showNextMore: true,
57+
selectComponent: Select,
58+
};
59+
60+
```
61+
62+
## Useage
63+
64+
```
65+
66+
<Pagination
67+
total={1000}
68+
style={{
69+
width: 260,
70+
height: 300
71+
}}
72+
/>
73+
74+
```

docs/index.html

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html style="width:100%; height:100%; overflow:hidden;">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<title>scrollview</title>
7+
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1">
8+
<style type="text/css">
9+
.demo {
10+
width: 1200px;
11+
height: 500px;
12+
margin: 100px auto;
13+
background: #FFF;
14+
font-size: 12px;
15+
overflow: auto;
16+
}
17+
</style>
18+
<link href="static\css\index.a46d9cf2.css" rel="stylesheet"></head>
19+
20+
<body style="background:#F5F5F5">
21+
<div class="demo" id="demo">
22+
</div>
23+
<script src="static\js\vendors.226cb6a9.chunk.js"></script><script src="static\js\index.0853f3d2.js"></script></body>
24+
25+
</html>

0 commit comments

Comments
 (0)