antd-management-fast-framework 1.12.95 → 1.12.96

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.
@@ -73,8 +73,8 @@ declare class BaseWindow extends Base {
73
73
  afterSetFieldsValue: (v: any) => void;
74
74
  afterCheckSubmitRequestParams: (o: any) => any;
75
75
  execSubmitApi: (values: {} | undefined, afterSubmitCallback: any) => void;
76
- handleOkWithForm: () => void;
77
- handleOk: (e: any) => void;
76
+ handleOkWithForm: (successCallback: any) => void;
77
+ handleOk: (e: any, successCallback?: null) => void;
78
78
  afterSubmitSuccess: ({ singleData, listData, extraData, responseOriginalData, submitData, }: {
79
79
  singleData?: null | undefined;
80
80
  listData?: any[] | undefined;
@@ -233,7 +233,7 @@ var BaseWindow = /*#__PURE__*/function (_Base) {
233
233
  }
234
234
 
235
235
  if ((0, _tools.isFunction)(afterSubmitCallback)) {
236
- afterSubmitCallback();
236
+ afterSubmitCallback(remoteData);
237
237
  }
238
238
  }
239
239
 
@@ -253,7 +253,7 @@ var BaseWindow = /*#__PURE__*/function (_Base) {
253
253
  }
254
254
  };
255
255
 
256
- _this.handleOkWithForm = function () {
256
+ _this.handleOkWithForm = function (successCallback) {
257
257
  var form = _this.getTargetForm();
258
258
 
259
259
  if (form == null) {
@@ -262,7 +262,11 @@ var BaseWindow = /*#__PURE__*/function (_Base) {
262
262
 
263
263
  var validateFields = form.validateFields;
264
264
  validateFields().then(function (values) {
265
- _this.execSubmitApi(values, function () {
265
+ _this.execSubmitApi(values, function (remoteData) {
266
+ if ((0, _tools.isFunction)(successCallback)) {
267
+ successCallback(remoteData);
268
+ }
269
+
266
270
  if (_this.goToUpdateWhenProcessed) {
267
271
  _this.reloadByUrl();
268
272
  }
@@ -299,10 +303,12 @@ var BaseWindow = /*#__PURE__*/function (_Base) {
299
303
  };
300
304
 
301
305
  _this.handleOk = function (e) {
306
+ var successCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
307
+
302
308
  if (_this.submitWithForm) {
303
- _this.handleOkWithForm(e);
309
+ _this.handleOkWithForm(e, successCallback);
304
310
  } else {
305
- _this.execSubmitApi();
311
+ _this.execSubmitApi({}, successCallback);
306
312
  }
307
313
  };
308
314
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-management-fast-framework",
3
- "version": "1.12.95",
3
+ "version": "1.12.96",
4
4
  "description": "antd-management-fast-framework",
5
5
  "keywords": [
6
6
  "antd-management-fast-framework"
@@ -219,7 +219,7 @@
219
219
  "src/framework",
220
220
  "src/utils"
221
221
  ],
222
- "gitHead": "7a4a19bfc4b310bf76c5b4375e4244a47d5453d6",
222
+ "gitHead": "b9f791496e4b23ecc1565725f443e87253247f8c",
223
223
  "gitHooks": {
224
224
  "pre-commit": "lint-staged"
225
225
  }