@hw-component/table 0.0.3-beta-v11 → 0.0.3-beta-v12
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/es/hooks/useReq.js
CHANGED
|
@@ -50,8 +50,9 @@ var useReq = (function (_ref) {
|
|
|
50
50
|
size: size,
|
|
51
51
|
current: current
|
|
52
52
|
}, oParams);
|
|
53
|
+
saveParams.old = reqParams;
|
|
53
54
|
return _context.abrupt("return", reload === null || reload === void 0 ? void 0 : reload(reqParams));
|
|
54
|
-
case
|
|
55
|
+
case 5:
|
|
55
56
|
case "end":
|
|
56
57
|
return _context.stop();
|
|
57
58
|
}
|
package/lib/hooks/useReq.js
CHANGED
|
@@ -53,8 +53,9 @@ var useReq = (function (_ref) {
|
|
|
53
53
|
size: size,
|
|
54
54
|
current: current
|
|
55
55
|
}, oParams);
|
|
56
|
+
saveParams.old = reqParams;
|
|
56
57
|
return _context.abrupt("return", reload === null || reload === void 0 ? void 0 : reload(reqParams));
|
|
57
|
-
case
|
|
58
|
+
case 5:
|
|
58
59
|
case "end":
|
|
59
60
|
return _context.stop();
|
|
60
61
|
}
|
package/package.json
CHANGED
|
@@ -18,6 +18,7 @@ export default ({ request ,loading,error,reload,dataSource,manual=false}: IParam
|
|
|
18
18
|
const reloadFn=async (params: Record<string, any>={})=>{
|
|
19
19
|
const { size = "10", current = "1", ...oParams } = params;
|
|
20
20
|
const reqParams = { size, current, ...oParams };
|
|
21
|
+
saveParams.old = reqParams;
|
|
21
22
|
return reload?.(reqParams);
|
|
22
23
|
}
|
|
23
24
|
const resultAction = useRequest((params = {}) => {
|
|
@@ -13,20 +13,12 @@ const configData = [
|
|
|
13
13
|
title: "操作",
|
|
14
14
|
name: "aaa",
|
|
15
15
|
showSearch: true,
|
|
16
|
-
searchType: "test",
|
|
17
16
|
},
|
|
18
17
|
];
|
|
19
|
-
const Test = () => {
|
|
20
|
-
return <div>test</div>;
|
|
21
|
-
};
|
|
22
18
|
export default () => {
|
|
23
19
|
const hTable = useHTable();
|
|
24
20
|
return (
|
|
25
|
-
<HFormConfigProvider
|
|
26
|
-
defaultComponent={{
|
|
27
|
-
test: Test,
|
|
28
|
-
}}
|
|
29
|
-
>
|
|
21
|
+
<HFormConfigProvider>
|
|
30
22
|
<HTable
|
|
31
23
|
configData={configData}
|
|
32
24
|
rowKey={"id"}
|
|
@@ -36,7 +28,7 @@ export default () => {
|
|
|
36
28
|
return <Button>点我</Button>;
|
|
37
29
|
}}
|
|
38
30
|
request={(params) => {
|
|
39
|
-
console.log(params)
|
|
31
|
+
console.log(params,"params")
|
|
40
32
|
const { current = 1 } = params;
|
|
41
33
|
return new Promise((resolve, reject) => {
|
|
42
34
|
setTimeout(() => {
|
|
@@ -25,7 +25,7 @@ const configData = [
|
|
|
25
25
|
export default () => {
|
|
26
26
|
const {run,loading,error,data}=useRequest((params)=>{
|
|
27
27
|
const { current = 1 } = params;
|
|
28
|
-
console.log("
|
|
28
|
+
console.log(params,"params")
|
|
29
29
|
return new Promise((resolve, reject) => {
|
|
30
30
|
setTimeout(() => {
|
|
31
31
|
// reject(new Error("错误"));
|