@hw-component/table 0.0.7-beta-v12 → 0.0.7-beta-v16
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/ModalTable/hooks.js +2 -1
- package/es/ModalTable/index.js +1 -0
- package/es/modal.d.ts +1 -0
- package/lib/ModalTable/hooks.js +2 -1
- package/lib/ModalTable/index.js +1 -0
- package/lib/modal.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/ModalTable/hooks.ts +2 -0
- package/src/components/ModalTable/index.tsx +1 -0
- package/src/components/modal.ts +1 -0
- package/src/pages/ModalTable/index.tsx +9 -2
package/es/ModalTable/hooks.js
CHANGED
|
@@ -19,7 +19,8 @@ var useHDialogTable = function useHDialogTable() {
|
|
|
19
19
|
return useMemo(function () {
|
|
20
20
|
return _objectSpread(_objectSpread({}, tableInstance), {}, {
|
|
21
21
|
show: function show(params) {},
|
|
22
|
-
hide: function hide() {}
|
|
22
|
+
hide: function hide() {},
|
|
23
|
+
params: {}
|
|
23
24
|
});
|
|
24
25
|
}, []);
|
|
25
26
|
};
|
package/es/ModalTable/index.js
CHANGED
|
@@ -54,6 +54,7 @@ var index = (function (_ref) {
|
|
|
54
54
|
showReq = _showParams$request === void 0 ? request : _showParams$request,
|
|
55
55
|
_showParams$params = showParams.params,
|
|
56
56
|
params = _showParams$params === void 0 ? oldP : _showParams$params;
|
|
57
|
+
currentTable.params = params;
|
|
57
58
|
return {
|
|
58
59
|
title: showTitle,
|
|
59
60
|
request: showReq,
|
package/es/modal.d.ts
CHANGED
|
@@ -94,6 +94,7 @@ export interface HDiaLogTableInstance {
|
|
|
94
94
|
table: TableInstance;
|
|
95
95
|
show: (params?: DialogParamsModal) => void;
|
|
96
96
|
hide: () => void;
|
|
97
|
+
params: any;
|
|
97
98
|
}
|
|
98
99
|
export interface ModalTableProps extends ModalProps {
|
|
99
100
|
tableProps?: Omit<HTableProps, "configData" | "request">;
|
package/lib/ModalTable/hooks.js
CHANGED
|
@@ -20,7 +20,8 @@ var useHDialogTable = function useHDialogTable() {
|
|
|
20
20
|
return React.useMemo(function () {
|
|
21
21
|
return _objectSpread(_objectSpread({}, tableInstance), {}, {
|
|
22
22
|
show: function show(params) {},
|
|
23
|
-
hide: function hide() {}
|
|
23
|
+
hide: function hide() {},
|
|
24
|
+
params: {}
|
|
24
25
|
});
|
|
25
26
|
}, []);
|
|
26
27
|
};
|
package/lib/ModalTable/index.js
CHANGED
|
@@ -57,6 +57,7 @@ var index = (function (_ref) {
|
|
|
57
57
|
showReq = _showParams$request === void 0 ? request : _showParams$request,
|
|
58
58
|
_showParams$params = showParams.params,
|
|
59
59
|
params = _showParams$params === void 0 ? oldP : _showParams$params;
|
|
60
|
+
currentTable.params = params;
|
|
60
61
|
return {
|
|
61
62
|
title: showTitle,
|
|
62
63
|
request: showReq,
|
package/lib/modal.d.ts
CHANGED
|
@@ -94,6 +94,7 @@ export interface HDiaLogTableInstance {
|
|
|
94
94
|
table: TableInstance;
|
|
95
95
|
show: (params?: DialogParamsModal) => void;
|
|
96
96
|
hide: () => void;
|
|
97
|
+
params: any;
|
|
97
98
|
}
|
|
98
99
|
export interface ModalTableProps extends ModalProps {
|
|
99
100
|
tableProps?: Omit<HTableProps, "configData" | "request">;
|
package/package.json
CHANGED
|
@@ -14,6 +14,7 @@ export const useHDialogTable = () => {
|
|
|
14
14
|
...tableInstance,
|
|
15
15
|
show: (params: DialogParamsModal) => {},
|
|
16
16
|
hide: () => {},
|
|
17
|
+
params:{}
|
|
17
18
|
} as HDiaLogTableInstance;
|
|
18
19
|
}, []);
|
|
19
20
|
};
|
|
@@ -43,6 +44,7 @@ export const useCurrentTable = ({ show, hide, dialogTable }: ParamsModal) => {
|
|
|
43
44
|
useEffect(() => {
|
|
44
45
|
dialogTableInstance.show = show;
|
|
45
46
|
dialogTableInstance.hide = hide;
|
|
47
|
+
|
|
46
48
|
}, []);
|
|
47
49
|
return dialogTableInstance;
|
|
48
50
|
};
|
package/src/components/modal.ts
CHANGED
|
@@ -127,6 +127,7 @@ export interface HDiaLogTableInstance {
|
|
|
127
127
|
table: TableInstance;
|
|
128
128
|
show: (params?: DialogParamsModal) => void;
|
|
129
129
|
hide: () => void;
|
|
130
|
+
params:any;
|
|
130
131
|
}
|
|
131
132
|
export interface ModalTableProps extends ModalProps {
|
|
132
133
|
tableProps?: Omit<HTableProps, "configData" | "request">;
|
|
@@ -89,12 +89,19 @@ export default () => {
|
|
|
89
89
|
<>
|
|
90
90
|
<Button
|
|
91
91
|
onClick={() => {
|
|
92
|
-
dialogTable.show({ title: "3333"});
|
|
92
|
+
dialogTable.show({ title: "3333",params:{id:1}});
|
|
93
93
|
}}
|
|
94
94
|
>
|
|
95
95
|
点我333
|
|
96
96
|
</Button>
|
|
97
|
-
<HModalTable
|
|
97
|
+
<HModalTable
|
|
98
|
+
dialogTable={dialogTable}
|
|
99
|
+
request={req2}
|
|
100
|
+
configData={configData}
|
|
101
|
+
tableProps={{
|
|
102
|
+
headerTitle:<div onClick={()=>{console.log(dialogTable.params)}}>点我</div>
|
|
103
|
+
}}
|
|
104
|
+
/>
|
|
98
105
|
<HTable configData={configData} headerTitle={<Test />} />
|
|
99
106
|
</>
|
|
100
107
|
);
|