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 分页器
33
44用于展示页码、请求数据等。
55
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% ;' />
77
88### 基础示例
99
@@ -78,6 +78,30 @@ function Demo() {
7878}
7979```
8080
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+
81105### Props
82106
83107``` ts
@@ -106,5 +130,7 @@ export interface PaginationProps {
106130 color? : string
107131 /** 页码跳转 */
108132 jumpBtn? : boolean ;
133+ /** 简洁版本 */
134+ simple? : boolean ;
109135}
110136```
You can’t perform that action at this time.
0 commit comments