File tree Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Pagination 分页器
33
44用于展示页码、请求数据等。
55
6- <img src =' https://user-images.githubusercontent.com/66067296/139399708-239e65f9-565e-4be2-9497-c8e5b836cef6 .png ' alt =' Pagination ' style =' zoom :33% ;' />
6+ <img src =' https://user-images.githubusercontent.com/66067296/140001996-ff0fe66c-0482-4576-9f19-11be3a6b7ada .png ' alt =' Pagination ' style =' zoom :33% ;' />
77
88### 基础示例
99
@@ -28,7 +28,7 @@ function Demo() {
2828}
2929```
3030
31- ### 使用icon && 修改大小 && 页码跳转
31+ ### 使用icon && 修改大小
3232
3333``` jsx
3434import { Fragment , useState } from ' react' ;
@@ -54,6 +54,30 @@ function Demo() {
5454}
5555```
5656
57+ ### 页码跳转
58+
59+ ``` jsx
60+ import { Fragment , useState } from ' react' ;
61+ import { Pagination } from ' @uiw/react-native' ;
62+ function Demo () {
63+ const [current , setCurrent ] = useState (false )
64+ return (
65+ < Fragment>
66+ < Pagination
67+ current= {current}
68+ total= {60 }
69+ pageSize= {8 }
70+ jumpBtn= {true }
71+ onPageChange= {(type , current ) => {
72+ setCurrent (current)
73+ console .log (' type, current: ' , type, current);
74+ }}
75+ / >
76+ < / Fragment>
77+ );
78+ }
79+ ```
80+
5781### Props
5882
5983``` ts
You can’t perform that action at this time.
0 commit comments