File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Pagination 分页器
3
3
4
4
用于展示页码、请求数据等。
5
5
6
- <img src =' https://user-images.githubusercontent.com/66067296/140001996-ff0fe66c-0482-4576-9f19-11be3a6b7ada .png ' alt =' Pagination ' style =' zoom :33% ;' />
6
+ <img src =' https://user-images.githubusercontent.com/66067296/140044665-d27bccd1-24ba-4eaf-949b-89b6dc9f0dad .png ' alt =' Pagination ' style =' zoom :33% ;' />
7
7
8
8
### 基础示例
9
9
@@ -78,6 +78,30 @@ function Demo() {
78
78
}
79
79
```
80
80
81
+ ### 简单版本
82
+
83
+ ``` jsx
84
+ import { Fragment , useState } from ' react' ;
85
+ import { Pagination } from ' @uiw/react-native' ;
86
+ function Demo () {
87
+ const [current , setCurrent ] = useState (false )
88
+ return (
89
+ < Fragment>
90
+ < Pagination
91
+ current= {current}
92
+ total= {60 }
93
+ pageSize= {8 }
94
+ simple
95
+ onPageChange= {(type , current ) => {
96
+ setCurrent (current)
97
+ console .log (' type, current: ' , type, current);
98
+ }}
99
+ / >
100
+ < / Fragment>
101
+ );
102
+ }
103
+ ```
104
+
81
105
### Props
82
106
83
107
``` ts
@@ -106,5 +130,7 @@ export interface PaginationProps {
106
130
color? : string
107
131
/** 页码跳转 */
108
132
jumpBtn? : boolean ;
133
+ /** 简洁版本 */
134
+ simple? : boolean ;
109
135
}
110
136
```
You can’t perform that action at this time.
0 commit comments