kn-hooks 0.0.18 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/md/usePagination.md +1 -2
- package/package.json +1 -1
- package/readme.md +1 -2
- package/src/usePagination/index.js +4 -2
package/md/usePagination.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
| Param | Type | Description |
|
|
21
21
|
| --- | --- | --- |
|
|
22
22
|
| props | <code>Object</code> | |
|
|
23
|
-
| props.service | <code>FunServices</code> |
|
|
23
|
+
| props.service | <code>FunServices</code> | 发送请求的方法 |
|
|
24
24
|
| [props.pagination] | <code>Pagination</code> | 默认分页信息 |
|
|
25
25
|
|
|
26
26
|
**Example**
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
const page = usePagination({
|
|
30
30
|
service:GET_LIST,
|
|
31
31
|
pagination:{pageSize:10},
|
|
32
|
-
|
|
33
32
|
});
|
|
34
33
|
|
|
35
34
|
useEffect(()=>{
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -335,7 +335,7 @@ const Index=()=>{
|
|
|
335
335
|
| Param | Type | Description |
|
|
336
336
|
| --- | --- | --- |
|
|
337
337
|
| props | <code>Object</code> | |
|
|
338
|
-
| props.service | <code>FunServices</code> |
|
|
338
|
+
| props.service | <code>FunServices</code> | 发送请求的方法 |
|
|
339
339
|
| [props.pagination] | <code>Pagination</code> | 默认分页信息 |
|
|
340
340
|
|
|
341
341
|
**Example**
|
|
@@ -344,7 +344,6 @@ const Index=()=>{
|
|
|
344
344
|
const page = usePagination({
|
|
345
345
|
service:GET_LIST,
|
|
346
346
|
pagination:{pageSize:10},
|
|
347
|
-
|
|
348
347
|
});
|
|
349
348
|
|
|
350
349
|
useEffect(()=>{
|
|
@@ -6,9 +6,12 @@ import { useState,useMemo,useRef } from 'react';
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* 分页管理器
|
|
9
|
+
*
|
|
10
|
+
*
|
|
9
11
|
* @param {Object} props
|
|
10
|
-
* @param {FunServices} props.service -
|
|
12
|
+
* @param {FunServices} props.service - 发送请求的方法
|
|
11
13
|
* @param {Pagination} [props.pagination] - 默认分页信息
|
|
14
|
+
*
|
|
12
15
|
* @version 1.0.0
|
|
13
16
|
*
|
|
14
17
|
* @example
|
|
@@ -16,7 +19,6 @@ import { useState,useMemo,useRef } from 'react';
|
|
|
16
19
|
const page = usePagination({
|
|
17
20
|
service:GET_LIST,
|
|
18
21
|
pagination:{pageSize:10},
|
|
19
|
-
|
|
20
22
|
});
|
|
21
23
|
|
|
22
24
|
useEffect(()=>{
|