@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.
@@ -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
  };
@@ -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">;
@@ -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
  };
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/table",
3
- "version": "0.0.7-beta-v12",
3
+ "version": "0.0.7-beta-v16",
4
4
  "description": "基于antd二次开发table组件",
5
5
  "keywords": [
6
6
  "table"
@@ -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
  };
@@ -30,6 +30,7 @@ export default ({
30
30
  request: showReq=request,
31
31
  params=oldP ,
32
32
  } = showParams;
33
+ currentTable.params=params;
33
34
  return {
34
35
  title: showTitle,
35
36
  request: showReq,
@@ -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 dialogTable={dialogTable} request={req2} configData={configData} />
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
  );