@hw-component/form 1.9.31 → 1.9.32

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.
@@ -83,26 +83,27 @@ var useInfoReq = function useInfoReq(_ref) {
83
83
  case 0:
84
84
  reqParams = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : reqData.params;
85
85
  reqData.params = reqParams;
86
+ form === null || form === void 0 || form.resetFields();
86
87
  if (!initReq) {
87
- _context2.next = 8;
88
+ _context2.next = 9;
88
89
  break;
89
90
  }
90
- _context2.next = 5;
91
+ _context2.next = 6;
91
92
  return initReq(reqParams);
92
- case 5:
93
+ case 6:
93
94
  result = _context2.sent;
94
95
  form === null || form === void 0 || form.setFieldsValue(result);
95
96
  return _context2.abrupt("return", result || {});
96
- case 8:
97
+ case 9:
97
98
  if (!(typeof initialValues === "undefined")) {
98
- _context2.next = 10;
99
+ _context2.next = 11;
99
100
  break;
100
101
  }
101
102
  return _context2.abrupt("return", {});
102
- case 10:
103
+ case 11:
103
104
  form === null || form === void 0 || form.setFieldsValue(initialValues);
104
105
  return _context2.abrupt("return", initialValues);
105
- case 12:
106
+ case 13:
106
107
  case "end":
107
108
  return _context2.stop();
108
109
  }
@@ -84,26 +84,27 @@ var useInfoReq = function useInfoReq(_ref) {
84
84
  case 0:
85
85
  reqParams = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : reqData.params;
86
86
  reqData.params = reqParams;
87
+ form === null || form === void 0 || form.resetFields();
87
88
  if (!initReq) {
88
- _context2.next = 8;
89
+ _context2.next = 9;
89
90
  break;
90
91
  }
91
- _context2.next = 5;
92
+ _context2.next = 6;
92
93
  return initReq(reqParams);
93
- case 5:
94
+ case 6:
94
95
  result = _context2.sent;
95
96
  form === null || form === void 0 || form.setFieldsValue(result);
96
97
  return _context2.abrupt("return", result || {});
97
- case 8:
98
+ case 9:
98
99
  if (!(typeof initialValues === "undefined")) {
99
- _context2.next = 10;
100
+ _context2.next = 11;
100
101
  break;
101
102
  }
102
103
  return _context2.abrupt("return", {});
103
- case 10:
104
+ case 11:
104
105
  form === null || form === void 0 || form.setFieldsValue(initialValues);
105
106
  return _context2.abrupt("return", initialValues);
106
- case 12:
107
+ case 13:
107
108
  case "end":
108
109
  return _context2.stop();
109
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "1.9.31",
3
+ "version": "1.9.32",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -59,6 +59,7 @@ export const useInfoReq = ({
59
59
  );
60
60
  const infoControl = useRequest(async (reqParams = reqData.params) => {
61
61
  reqData.params = reqParams;
62
+ form?.resetFields();
62
63
  if (initReq) {
63
64
  const result = await initReq(reqParams);
64
65
  form?.setFieldsValue(result);