@hw-component/form 1.10.90 → 1.10.91

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.
@@ -55,6 +55,10 @@ var Index = function Index(_ref) {
55
55
  modalTitle = _useModifyProps.title,
56
56
  saveOldParams = _useModifyProps.saveOldParams;
57
57
  var cancel = function cancel() {
58
+ if (dialogForm) {
59
+ dialogForm.hide();
60
+ return;
61
+ }
58
62
  saveOldParams();
59
63
  if (onCancel) {
60
64
  return onCancel === null || onCancel === void 0 ? void 0 : onCancel();
@@ -196,7 +196,7 @@ var useFooterRender = function useFooterRender(_ref4) {
196
196
  dialogForm = _ref4.dialogForm,
197
197
  params = _ref4.params,
198
198
  onOk = _ref4.onOk,
199
- _onCancel = _ref4.onCancel;
199
+ onCancel = _ref4.onCancel;
200
200
  if (footer === null) {
201
201
  return null;
202
202
  }
@@ -204,13 +204,7 @@ var useFooterRender = function useFooterRender(_ref4) {
204
204
  return footer(dialogForm, confirmLoading, params);
205
205
  }
206
206
  return footer || jsx(Footer, {
207
- onCancel: function onCancel() {
208
- if (dialogForm) {
209
- dialogForm.hide();
210
- return;
211
- }
212
- _onCancel === null || _onCancel === void 0 || _onCancel();
213
- },
207
+ onCancel: onCancel,
214
208
  onOk: onOk,
215
209
  confirmLoading: confirmLoading
216
210
  });
@@ -58,6 +58,10 @@ var Index = function Index(_ref) {
58
58
  modalTitle = _useModifyProps.title,
59
59
  saveOldParams = _useModifyProps.saveOldParams;
60
60
  var cancel = function cancel() {
61
+ if (dialogForm) {
62
+ dialogForm.hide();
63
+ return;
64
+ }
61
65
  saveOldParams();
62
66
  if (onCancel) {
63
67
  return onCancel === null || onCancel === void 0 ? void 0 : onCancel();
@@ -197,7 +197,7 @@ var useFooterRender = function useFooterRender(_ref4) {
197
197
  dialogForm = _ref4.dialogForm,
198
198
  params = _ref4.params,
199
199
  onOk = _ref4.onOk,
200
- _onCancel = _ref4.onCancel;
200
+ onCancel = _ref4.onCancel;
201
201
  if (footer === null) {
202
202
  return null;
203
203
  }
@@ -205,13 +205,7 @@ var useFooterRender = function useFooterRender(_ref4) {
205
205
  return footer(dialogForm, confirmLoading, params);
206
206
  }
207
207
  return footer || jsxRuntime.jsx(Footer.default, {
208
- onCancel: function onCancel() {
209
- if (dialogForm) {
210
- dialogForm.hide();
211
- return;
212
- }
213
- _onCancel === null || _onCancel === void 0 || _onCancel();
214
- },
208
+ onCancel: onCancel,
215
209
  onOk: onOk,
216
210
  confirmLoading: confirmLoading
217
211
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "1.10.90",
3
+ "version": "1.10.91",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -55,6 +55,10 @@ const Index: React.FC<DialogFormProps> = ({
55
55
  autoClear,
56
56
  });
57
57
  const cancel = () => {
58
+ if (dialogForm){
59
+ dialogForm.hide();
60
+ return ;
61
+ }
58
62
  saveOldParams();
59
63
  if (onCancel) {
60
64
  return onCancel?.();
@@ -183,13 +183,7 @@ export const useFooterRender = ({
183
183
  return (
184
184
  footer || (
185
185
  <Footer
186
- onCancel={() => {
187
- if (dialogForm) {
188
- dialogForm.hide();
189
- return;
190
- }
191
- onCancel?.();
192
- }}
186
+ onCancel={onCancel}
193
187
  onOk={onOk}
194
188
  confirmLoading={confirmLoading}
195
189
  />
@@ -71,6 +71,7 @@ export default () => {
71
71
  configData={data}
72
72
  visible={visible}
73
73
  onCancel={()=>{
74
+ console.log("fffff")
74
75
  setVisible(false);
75
76
  }}
76
77
  formItemStyle={{