@guo514360255/antd-lib 1.4.3 → 1.4.4
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.
|
@@ -5,7 +5,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
|
5
5
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
6
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
7
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
8
|
-
var _excluded = ["type", "onSubmit", "columns", "saveRequest", "updateRequest", "detailRequest", "handleData", "title", "formList"];
|
|
8
|
+
var _excluded = ["type", "onSubmit", "columns", "saveRequest", "updateRequest", "detailRequest", "handleData", "title", "tableActionRef", "formList"];
|
|
9
9
|
/*
|
|
10
10
|
* @Author: 郭郭
|
|
11
11
|
* @Date: 2025/8/15
|
|
@@ -28,6 +28,7 @@ var CustomFormModal = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
28
28
|
detailRequest = props.detailRequest,
|
|
29
29
|
handleData = props.handleData,
|
|
30
30
|
title = props.title,
|
|
31
|
+
tableActionRef = props.tableActionRef,
|
|
31
32
|
_props$formList = props.formList,
|
|
32
33
|
formList = _props$formList === void 0 ? {} : _props$formList,
|
|
33
34
|
other = _objectWithoutProperties(props, _excluded);
|
|
@@ -135,7 +136,7 @@ var CustomFormModal = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
135
136
|
});
|
|
136
137
|
var submitEvent = /*#__PURE__*/function () {
|
|
137
138
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
138
|
-
var _formRef$current3, _formRef$current4, formData, data, result, _key2;
|
|
139
|
+
var _formRef$current3, _formRef$current4, _tableActionRef$curre, formData, data, result, _key2;
|
|
139
140
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
140
141
|
while (1) switch (_context2.prev = _context2.next) {
|
|
141
142
|
case 0:
|
|
@@ -184,19 +185,20 @@ var CustomFormModal = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
184
185
|
onSubmit();
|
|
185
186
|
}
|
|
186
187
|
messageApi.success('提交成功');
|
|
187
|
-
|
|
188
|
+
tableActionRef === null || tableActionRef === void 0 || (_tableActionRef$curre = tableActionRef.current) === null || _tableActionRef$curre === void 0 || _tableActionRef$curre.reload();
|
|
189
|
+
_context2.next = 28;
|
|
188
190
|
break;
|
|
189
|
-
case
|
|
190
|
-
_context2.prev =
|
|
191
|
+
case 25:
|
|
192
|
+
_context2.prev = 25;
|
|
191
193
|
_context2.t0 = _context2["catch"](1);
|
|
192
194
|
console.log(_context2.t0, 'submit request error');
|
|
193
|
-
case 27:
|
|
194
|
-
setLoading(false);
|
|
195
195
|
case 28:
|
|
196
|
+
setLoading(false);
|
|
197
|
+
case 29:
|
|
196
198
|
case "end":
|
|
197
199
|
return _context2.stop();
|
|
198
200
|
}
|
|
199
|
-
}, _callee2, null, [[1,
|
|
201
|
+
}, _callee2, null, [[1, 25]]);
|
|
200
202
|
}));
|
|
201
203
|
return function submitEvent() {
|
|
202
204
|
return _ref.apply(this, arguments);
|
|
@@ -402,6 +402,7 @@ var CustomTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
402
402
|
}, detailProps || {})), /*#__PURE__*/React.createElement(CustomFormModal, _extends({
|
|
403
403
|
title: title,
|
|
404
404
|
ref: formModalRef,
|
|
405
|
+
tableActionRef: actionRef,
|
|
405
406
|
saveRequest: saveRequest,
|
|
406
407
|
updateRequest: updateRequest,
|
|
407
408
|
detailRequest: detailRequest,
|