antd-management-fast-framework 1.12.95 → 1.12.98

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.
@@ -46,8 +46,11 @@ declare class Base extends BaseWindow {
46
46
  buildBottomBarInnerDefaultConfigList: () => {
47
47
  buildType: string;
48
48
  }[];
49
- buildBottomBarInnerItemConfigList: () => any[];
50
- renderBottomBarInner: () => any[];
49
+ buildBottomBarInnerLeftItemConfigList: () => never[];
50
+ buildBottomBarInnerRightItemConfigList: () => any[];
51
+ renderBottomBarRightBox: () => any[] | null;
52
+ renderBottomBarLeftBox: () => any[] | null;
53
+ renderBottomBarInnerBox: (configList: any) => any[] | null;
51
54
  renderBottomBar: () => JSX.Element;
52
55
  renderFurther(): JSX.Element;
53
56
  }
@@ -41,6 +41,8 @@ var _layout = _interopRequireDefault(require("antd/es/layout"));
41
41
 
42
42
  var _react = _interopRequireWildcard(require("react"));
43
43
 
44
+ var _FlexBox = _interopRequireDefault(require("../../../customComponents/FlexBox"));
45
+
44
46
  var _FunctionComponent = require("../../../customComponents/FunctionComponent");
45
47
 
46
48
  var _IconInfo = _interopRequireDefault(require("../../../customComponents/IconInfo"));
@@ -224,7 +226,11 @@ var Base = /*#__PURE__*/function (_BaseWindow) {
224
226
  }];
225
227
  };
226
228
 
227
- _this.buildBottomBarInnerItemConfigList = function () {
229
+ _this.buildBottomBarInnerLeftItemConfigList = function () {
230
+ return [];
231
+ };
232
+
233
+ _this.buildBottomBarInnerRightItemConfigList = function () {
228
234
  var bottomBarInnerExtraConfigList = _this.buildBottomBarInnerExtraConfigList();
229
235
 
230
236
  var bottomBarInnerDefaultConfigList = _this.buildBottomBarInnerDefaultConfigList();
@@ -232,10 +238,24 @@ var Base = /*#__PURE__*/function (_BaseWindow) {
232
238
  return [].concat(_toConsumableArray(bottomBarInnerExtraConfigList), _toConsumableArray(bottomBarInnerDefaultConfigList));
233
239
  };
234
240
 
235
- _this.renderBottomBarInner = function () {
236
- var components = [];
241
+ _this.renderBottomBarRightBox = function () {
242
+ var rightConfigList = _this.buildBottomBarInnerRightItemConfigList();
243
+
244
+ return _this.renderBottomBarInnerBox(rightConfigList);
245
+ };
237
246
 
238
- var configList = _this.buildBottomBarInnerItemConfigList();
247
+ _this.renderBottomBarLeftBox = function () {
248
+ var leftConfigList = _this.buildBottomBarInnerLeftItemConfigList();
249
+
250
+ return _this.renderBottomBarInnerBox(leftConfigList);
251
+ };
252
+
253
+ _this.renderBottomBarInnerBox = function (configList) {
254
+ if (!(0, _tools.isArray)(configList) || configList.length <= 0) {
255
+ return null;
256
+ }
257
+
258
+ var components = [];
239
259
 
240
260
  var that = _assertThisInitialized(_this);
241
261
 
@@ -333,6 +353,10 @@ var Base = /*#__PURE__*/function (_BaseWindow) {
333
353
  };
334
354
 
335
355
  _this.renderBottomBar = function () {
356
+ var bottomBarLeftBox = _this.renderBottomBarLeftBox();
357
+
358
+ var bottomBarRightBox = _this.renderBottomBarRightBox();
359
+
336
360
  return /*#__PURE__*/_react.default.createElement(Footer, null, /*#__PURE__*/_react.default.createElement(_affix.default, {
337
361
  offsetBottom: 0
338
362
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -342,11 +366,23 @@ var Base = /*#__PURE__*/function (_BaseWindow) {
342
366
  style: {
343
367
  textAlign: 'right'
344
368
  }
345
- }, /*#__PURE__*/_react.default.createElement(_space.default, {
346
- split: /*#__PURE__*/_react.default.createElement(_divider.default, {
347
- type: "vertical"
348
- })
349
- }, _this.renderBottomBarInner()))))));
369
+ }, /*#__PURE__*/_react.default.createElement(_FlexBox.default, {
370
+ flexAuto: "left",
371
+ left: /*#__PURE__*/_react.default.createElement(_FlexBox.default, {
372
+ flexAuto: "right",
373
+ left: /*#__PURE__*/_react.default.createElement(_space.default, {
374
+ split: /*#__PURE__*/_react.default.createElement(_divider.default, {
375
+ type: "vertical"
376
+ })
377
+ }, bottomBarLeftBox),
378
+ right: /*#__PURE__*/_react.default.createElement("div", null)
379
+ }),
380
+ right: /*#__PURE__*/_react.default.createElement(_space.default, {
381
+ split: /*#__PURE__*/_react.default.createElement(_divider.default, {
382
+ type: "vertical"
383
+ })
384
+ }, bottomBarRightBox)
385
+ }))))));
350
386
  };
351
387
 
352
388
  var defaultState = (0, _tools.defaultFormState)();
@@ -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.98",
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": "97b3e6c9e997ea90c415d949825ae4987e0ec733",
223
223
  "gitHooks": {
224
224
  "pre-commit": "lint-staged"
225
225
  }