antd-management-fast-framework 1.2.18 → 1.2.29

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.
@@ -12,7 +12,10 @@ declare namespace ColorText {
12
12
  const randomColor: boolean;
13
13
  const color: string;
14
14
  const textPrefix: null;
15
+ const textPrefixStyle: null;
15
16
  const text: string;
17
+ const separator: string;
18
+ const separatorStyle: null;
16
19
  }
17
20
  }
18
21
  import React from "react";
@@ -77,12 +77,15 @@ var ColorText = /*#__PURE__*/function (_PureComponent) {
77
77
 
78
78
  var _this$props2 = this.props,
79
79
  textPrefix = _this$props2.textPrefix,
80
+ textPrefixStyle = _this$props2.textPrefixStyle,
80
81
  randomSeed = _this$props2.randomSeed,
81
82
  seedOffset = _this$props2.seedOffset,
82
83
  randomColor = _this$props2.randomColor,
83
84
  color = _this$props2.color,
84
85
  text = _this$props2.text,
85
- canCopy = _this$props2.canCopy;
86
+ canCopy = _this$props2.canCopy,
87
+ separator = _this$props2.separator,
88
+ separatorStyle = _this$props2.separatorStyle;
86
89
  var colorValue = color || '';
87
90
  var randomColorValue = randomColor || false;
88
91
 
@@ -105,7 +108,11 @@ var ColorText = /*#__PURE__*/function (_PureComponent) {
105
108
  onClick: function onClick() {
106
109
  _this2.copyText();
107
110
  }
108
- }, (0, _tools.stringIsNullOrWhiteSpace)(textPrefix) ? '' : "".concat(textPrefix, "\uFF1A"), /*#__PURE__*/_react["default"].createElement("span", {
111
+ }, (0, _tools.stringIsNullOrWhiteSpace)(textPrefix) ? '' : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
112
+ style: textPrefixStyle || null
113
+ }, textPrefix), (0, _tools.stringIsNullOrWhiteSpace)(separator) ? null : /*#__PURE__*/_react["default"].createElement("span", {
114
+ style: separatorStyle || null
115
+ }, separator)), /*#__PURE__*/_react["default"].createElement("span", {
109
116
  style: textStyle
110
117
  }, text));
111
118
  }
@@ -121,7 +128,10 @@ ColorText.defaultProps = {
121
128
  randomColor: false,
122
129
  color: '',
123
130
  textPrefix: null,
124
- text: ''
131
+ textPrefixStyle: null,
132
+ text: '',
133
+ separator: ':',
134
+ separatorStyle: null
125
135
  };
126
136
  var _default = ColorText;
127
137
  exports["default"] = _default;
@@ -363,6 +363,22 @@ export function buildColumnItem({ column: columnConfig, attachedTargetName, }: {
363
363
  column: any;
364
364
  attachedTargetName?: string | undefined;
365
365
  }): any;
366
+ /**
367
+ * 构建彩色文本
368
+ */
369
+ export function buildColorText({ canCopy, randomSeed, seedOffset, randomColor, color, textPrefix, textPrefixStyle, text, separator, separatorStyle, wrapperBuilder, }: {
370
+ canCopy?: boolean | undefined;
371
+ randomSeed?: number | undefined;
372
+ seedOffset?: number | undefined;
373
+ randomColor?: boolean | undefined;
374
+ color?: string | undefined;
375
+ textPrefix?: null | undefined;
376
+ textPrefixStyle?: null | undefined;
377
+ text?: string | undefined;
378
+ separator?: string | undefined;
379
+ separatorStyle?: null | undefined;
380
+ wrapperBuilder?: null | undefined;
381
+ }): any;
366
382
  /**
367
383
  * 占位函数
368
384
  *
@@ -53,6 +53,7 @@ exports.buildFormTextArea = buildFormTextArea;
53
53
  exports.buildFormDatePicker = buildFormDatePicker;
54
54
  exports.buildColumnList = buildColumnList;
55
55
  exports.buildColumnItem = buildColumnItem;
56
+ exports.buildColorText = buildColorText;
56
57
  exports.empty = empty;
57
58
 
58
59
  require("antd/es/badge/style");
@@ -157,6 +158,8 @@ var _FlexBox = _interopRequireDefault(require("../FlexBox"));
157
158
 
158
159
  var _FlexText = _interopRequireDefault(require("../FlexText"));
159
160
 
161
+ var _ColorText = _interopRequireDefault(require("../ColorText"));
162
+
160
163
  var _index = _interopRequireDefault(require("./index.less"));
161
164
 
162
165
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -2787,6 +2790,54 @@ function buildColumnItem(_ref48) {
2787
2790
 
2788
2791
  return d;
2789
2792
  }
2793
+ /**
2794
+ * 构建彩色文本
2795
+ */
2796
+
2797
+
2798
+ function buildColorText(_ref49) {
2799
+ var _ref49$canCopy = _ref49.canCopy,
2800
+ canCopy = _ref49$canCopy === void 0 ? false : _ref49$canCopy,
2801
+ _ref49$randomSeed = _ref49.randomSeed,
2802
+ randomSeed = _ref49$randomSeed === void 0 ? 0 : _ref49$randomSeed,
2803
+ _ref49$seedOffset = _ref49.seedOffset,
2804
+ seedOffset = _ref49$seedOffset === void 0 ? 0 : _ref49$seedOffset,
2805
+ _ref49$randomColor = _ref49.randomColor,
2806
+ randomColor = _ref49$randomColor === void 0 ? false : _ref49$randomColor,
2807
+ _ref49$color = _ref49.color,
2808
+ color = _ref49$color === void 0 ? '' : _ref49$color,
2809
+ _ref49$textPrefix = _ref49.textPrefix,
2810
+ textPrefix = _ref49$textPrefix === void 0 ? null : _ref49$textPrefix,
2811
+ _ref49$textPrefixStyl = _ref49.textPrefixStyle,
2812
+ textPrefixStyle = _ref49$textPrefixStyl === void 0 ? null : _ref49$textPrefixStyl,
2813
+ _ref49$text = _ref49.text,
2814
+ text = _ref49$text === void 0 ? '' : _ref49$text,
2815
+ _ref49$separator = _ref49.separator,
2816
+ separator = _ref49$separator === void 0 ? ':' : _ref49$separator,
2817
+ _ref49$separatorStyle = _ref49.separatorStyle,
2818
+ separatorStyle = _ref49$separatorStyle === void 0 ? null : _ref49$separatorStyle,
2819
+ _ref49$wrapperBuilder = _ref49.wrapperBuilder,
2820
+ wrapperBuilder = _ref49$wrapperBuilder === void 0 ? null : _ref49$wrapperBuilder;
2821
+
2822
+ var colorText = /*#__PURE__*/_react["default"].createElement(_ColorText["default"], {
2823
+ canCopy: canCopy || false,
2824
+ randomSeed: randomSeed || 0,
2825
+ seedOffset: seedOffset || 0,
2826
+ randomColor: randomColor || false,
2827
+ color: color || '',
2828
+ textPrefix: textPrefix || null,
2829
+ textPrefixStyle: textPrefixStyle || null,
2830
+ text: text || '',
2831
+ separator: separator || ':',
2832
+ separatorStyle: separatorStyle || null
2833
+ });
2834
+
2835
+ if (!(0, _tools.isFunction)(wrapperBuilder)) {
2836
+ return colorText;
2837
+ }
2838
+
2839
+ return wrapperBuilder(colorText);
2840
+ }
2790
2841
  /**
2791
2842
  * 占位函数
2792
2843
  *
@@ -94,21 +94,21 @@ declare class Common extends Core {
94
94
  getSaveButtonIcon: () => JSX.Element;
95
95
  getDisabledButtonIcon: () => JSX.Element;
96
96
  renderDisabledButton: (text?: string) => JSX.Element;
97
- renderSaveButton: ({ icon, text, onClick, disabled, processing, hidden, }: {
97
+ renderSaveButton: ({ icon, text, handleClick, disabled, processing, hidden, }: {
98
98
  icon: any;
99
99
  text: any;
100
- onClick: any;
100
+ handleClick: any;
101
101
  disabled?: boolean | undefined;
102
102
  processing?: boolean | undefined;
103
103
  hidden?: boolean | undefined;
104
104
  }) => JSX.Element | null;
105
- renderGeneralButton: ({ key, type, size, text, icon, onClick, danger, disabled, hidden, confirm, processing, handleData, style, showIcon, }: {
105
+ renderGeneralButton: ({ key, type, size, text, icon, handleClick, danger, disabled, hidden, confirm, processing, handleData, style, showIcon, }: {
106
106
  key?: null | undefined;
107
107
  type: any;
108
108
  size: any;
109
109
  text: any;
110
110
  icon: any;
111
- onClick: any;
111
+ handleClick: any;
112
112
  danger?: boolean | undefined;
113
113
  disabled?: boolean | undefined;
114
114
  hidden?: boolean | undefined;
@@ -910,7 +910,7 @@ var Common = /*#__PURE__*/function (_Core) {
910
910
  _this.renderSaveButton = function (_ref2) {
911
911
  var icon = _ref2.icon,
912
912
  text = _ref2.text,
913
- _onClick = _ref2.onClick,
913
+ _handleClick = _ref2.handleClick,
914
914
  _ref2$disabled = _ref2.disabled,
915
915
  disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
916
916
  _ref2$processing = _ref2.processing,
@@ -932,9 +932,9 @@ var Common = /*#__PURE__*/function (_Core) {
932
932
  hidden: hidden,
933
933
  disabled: disabled || buttonDisabled,
934
934
  processing: processing || buttonProcessing,
935
- onClick: function onClick(e) {
936
- if ((0, _tools.isFunction)(_onClick)) {
937
- _onClick(e);
935
+ handleClick: function handleClick(e) {
936
+ if ((0, _tools.isFunction)(_handleClick)) {
937
+ _handleClick(e);
938
938
  } else {
939
939
  that.validate(e);
940
940
  }
@@ -949,7 +949,7 @@ var Common = /*#__PURE__*/function (_Core) {
949
949
  size = _ref3.size,
950
950
  text = _ref3.text,
951
951
  icon = _ref3.icon,
952
- onClick = _ref3.onClick,
952
+ handleClick = _ref3.handleClick,
953
953
  _ref3$danger = _ref3.danger,
954
954
  danger = _ref3$danger === void 0 ? false : _ref3$danger,
955
955
  _ref3$disabled = _ref3.disabled,
@@ -977,7 +977,7 @@ var Common = /*#__PURE__*/function (_Core) {
977
977
  size: size,
978
978
  text: text,
979
979
  icon: icon,
980
- handleClick: onClick,
980
+ handleClick: handleClick,
981
981
  danger: danger || false,
982
982
  disabled: disabled,
983
983
  processing: processing,
@@ -1703,7 +1703,7 @@ var Common = /*#__PURE__*/function (_Core) {
1703
1703
  showIcon: false,
1704
1704
  disabled: (0, _tools.stringIsNullOrWhiteSpace)(contentItem.value || ''),
1705
1705
  text: '点击复制',
1706
- onClick: function onClick() {
1706
+ handleClick: function handleClick() {
1707
1707
  (0, _tools.copyToClipboard)(contentItem.value || '');
1708
1708
  }
1709
1709
  })
@@ -206,7 +206,7 @@ var Base = /*#__PURE__*/function (_BaseWindow) {
206
206
  icon: /*#__PURE__*/_react["default"].createElement(_icons.CloseCircleOutlined, null),
207
207
  text: '关闭'
208
208
  }), option || {}), {
209
- onClick: function onClick() {
209
+ handleClick: function handleClick() {
210
210
  _this.onClose();
211
211
  }
212
212
  });
@@ -271,7 +271,7 @@ var Base = /*#__PURE__*/function (_BaseWindow) {
271
271
 
272
272
  case _constants.drawerConfig.bottomBarBuildType.save:
273
273
  itemAdjust = _this.renderSaveButton(_objectSpread(_objectSpread({}, item), {
274
- onClick: function onClick(e) {
274
+ handleClick: function handleClick(e) {
275
275
  that.handleOk(e);
276
276
  }
277
277
  }));
@@ -74,7 +74,7 @@ var BaseAddDrawer = /*#__PURE__*/function (_BaseNeedlessLoadDraw) {
74
74
  icon: /*#__PURE__*/_react["default"].createElement(_icons.SaveOutlined, null),
75
75
  text: '保存',
76
76
  disabled: buttonProcessing,
77
- onClick: function onClick(e) {
77
+ handleClick: function handleClick(e) {
78
78
  that.handleOk(e);
79
79
  }
80
80
  }, {
@@ -58,7 +58,7 @@ declare class ListBase extends AuthorizationWrapper {
58
58
  fillSearchCardInitialValues: () => {};
59
59
  buildSearchCard: () => JSX.Element | null;
60
60
  renderForm: () => JSX.Element | null;
61
- buildTableOtherConfig: () => {};
61
+ establishTableAdditionalConfig: () => {};
62
62
  establishTableExpandableConfig: () => null;
63
63
  restoreColumnsOtherConfigArray: () => void;
64
64
  buildTableConfig: () => {
@@ -95,7 +95,14 @@ declare class ListBase extends AuthorizationWrapper {
95
95
  onPageHeaderAvatarLoadErrorCallback: () => void;
96
96
  establishViewDataSource: () => null;
97
97
  establishCardCollectionViewItemConfig: (record: any) => null;
98
+ /**
99
+ * 不要在框架之外重载或覆盖该该函数,否则分页视图将功能异常
100
+ */
98
101
  establishViewPaginationConfig: () => null;
102
+ /**
103
+ * 不要在框架之外重载或覆盖该该函数,否则分页视图将功能异常
104
+ */
105
+ supplementPaginationConfig: () => any;
99
106
  establishPageHeaderActionExtraGroupConfig: () => null;
100
107
  establishPageHeaderActionExtraEllipsisConfig: () => null;
101
108
  buildPageHeaderAction: () => JSX.Element;
@@ -125,6 +132,35 @@ declare class ListBase extends AuthorizationWrapper {
125
132
  list: never[];
126
133
  }[];
127
134
  };
135
+ /**
136
+ * 配置StandardTable切换页面时需要引发的事项
137
+ * @param {*} pagination
138
+ * @param {*} filtersArg
139
+ * @param {*} sorter
140
+ */
141
+ handleStandardTableChange: (pagination: any, filtersArg: any, sorter: any) => void;
142
+ /**
143
+ * 配置额外的StandardTable切换页面时需要引发的事项
144
+ * @param {*} pagination
145
+ * @param {*} filtersArg
146
+ * @param {*} sorter
147
+ */
148
+ handleAdditionalStandardTableChange: (pagination: any, filtersArg: any, sorter: any) => void;
149
+ /**
150
+ * 配置Pagination切换页面时需要引发的事项,用于listView/cardView
151
+ * @param {*} pagination
152
+ * @param {*} filtersArg
153
+ * @param {*} sorter
154
+ */
155
+ handlePaginationChange: (page: any, pageSize: any) => void;
156
+ /**
157
+ * 配置额外的Pagination切换页面时需要引发的事项,用于listView/cardView
158
+ * @param {*} pagination
159
+ * @param {*} filtersArg
160
+ * @param {*} sorter
161
+ */
162
+ handleAdditionalPaginationChange: (page: any, pageSize: any) => void;
163
+ handlePaginationShowSizeChange: (current: any, size: any) => void;
128
164
  renderPageHeaderContent: () => JSX.Element | null;
129
165
  establishPageHeaderExtraContentConfig: () => null;
130
166
  renderPageHeaderExtraContent: () => JSX.Element | null;
@@ -572,7 +572,7 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
572
572
  return _this.buildSearchCard();
573
573
  };
574
574
 
575
- _this.buildTableOtherConfig = function () {
575
+ _this.establishTableAdditionalConfig = function () {
576
576
  // 可以配置额外的Table属性
577
577
  return {};
578
578
  };
@@ -601,7 +601,7 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
601
601
 
602
602
  var expandable = _this.establishTableExpandableConfig();
603
603
 
604
- return _objectSpread(_objectSpread({}, _this.buildTableOtherConfig()), {}, {
604
+ return _objectSpread(_objectSpread({}, _this.establishTableAdditionalConfig()), {}, {
605
605
  columns: columns,
606
606
  size: tableSize,
607
607
  expandable: expandable
@@ -889,6 +889,24 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
889
889
  return null;
890
890
  };
891
891
 
892
+ _this.supplementPaginationConfig = function () {
893
+ var pageSize = _this.state.pageSize;
894
+
895
+ var config = _objectSpread(_objectSpread(_objectSpread({}, {
896
+ size: 'default',
897
+ showSizeChanger: true,
898
+ showQuickJumper: true,
899
+ showTotal: function showTotal(total, range) {
900
+ return "".concat(range[0], "-").concat(range[1], " \u5171 ").concat(total, " \u6761\u4FE1\u606F");
901
+ }
902
+ }), _this.establishViewPaginationConfig()), {
903
+ pageSize: pageSize
904
+ });
905
+
906
+ delete config.current;
907
+ return config;
908
+ };
909
+
892
910
  _this.establishPageHeaderActionExtraGroupConfig = function () {
893
911
  return null;
894
912
  };
@@ -970,6 +988,26 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
970
988
  };
971
989
  };
972
990
 
991
+ _this.handleStandardTableChange = function (pagination, filtersArg, sorter) {
992
+ _this.handleAdditionalStandardTableChange(pagination, filtersArg, sorter);
993
+ };
994
+
995
+ _this.handleAdditionalStandardTableChange = function (pagination, filtersArg, sorter) {};
996
+
997
+ _this.handlePaginationChange = function (page, pageSize) {
998
+ _this.handleAdditionalPaginationChange(page, pageSize);
999
+ };
1000
+
1001
+ _this.handleAdditionalPaginationChange = function (page, pageSize) {};
1002
+
1003
+ _this.handlePaginationShowSizeChange = function (current, size) {
1004
+ _this.setState({
1005
+ pageNo: 1
1006
+ }, function () {
1007
+ _this.handlePaginationChange(1, size);
1008
+ });
1009
+ };
1010
+
973
1011
  _this.renderPageHeaderContent = function () {
974
1012
  return (0, _FunctionComponent.buildPageHeaderContent)(_this.establishPageHeaderContentConfig() || {});
975
1013
  };
@@ -1093,13 +1131,23 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
1093
1131
  dataLoading = _this$state5.dataLoading,
1094
1132
  reloading = _this$state5.reloading,
1095
1133
  processing = _this$state5.processing;
1134
+ var pagination = false;
1135
+
1136
+ var paginationConfig = _this.establishViewPaginationConfig();
1137
+
1138
+ if (!!paginationConfig) {
1139
+ pagination = _this.supplementPaginationConfig();
1140
+ pagination.onChange = _this.handlePaginationChange;
1141
+ pagination.onShowSizeChange = _this.handlePaginationShowSizeChange;
1142
+ }
1143
+
1096
1144
  return /*#__PURE__*/_react["default"].createElement(_spin["default"], {
1097
1145
  spinning: dataLoading || reloading || processing
1098
1146
  }, /*#__PURE__*/_react["default"].createElement(_list["default"], {
1099
1147
  itemLayout: _this.renderListViewItemLayout(),
1100
1148
  size: _this.renderListViewSize(),
1101
1149
  dataSource: _this.establishViewDataSource(),
1102
- pagination: _this.establishViewPaginationConfig() || false,
1150
+ pagination: pagination,
1103
1151
  renderItem: function renderItem(item, index) {
1104
1152
  return _this.renderListViewItem(item, index);
1105
1153
  }
@@ -1130,26 +1178,18 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
1130
1178
  columns: columns,
1131
1179
  size: size || null,
1132
1180
  onSelectRow: _this.handleSelectRows,
1133
- onChange: paginationConfig ? _this.handleStandardTableChange : null
1181
+ onChange: _this.handleStandardTableChange
1134
1182
  };
1135
1183
 
1136
1184
  if (!!paginationConfig) {
1137
- standardTableCustomOption.data = {
1138
- list: _this.establishViewDataSource(),
1139
- pagination: paginationConfig
1140
- };
1141
1185
  standardTableCustomOption.showPagination = true;
1142
1186
  } else {
1143
- standardTableCustomOption.data = {
1144
- list: _this.establishViewDataSource(),
1145
- pagination: false
1146
- };
1147
- standardTableCustomOption.showPagination = frontendPagination ? true : false;
1187
+ standardTableCustomOption.showPagination = !!frontendPagination;
1148
1188
  }
1149
1189
 
1150
1190
  standardTableCustomOption.data = {
1151
1191
  list: _this.establishViewDataSource(),
1152
- pagination: !!paginationConfig ? paginationConfig : false
1192
+ pagination: _this.supplementPaginationConfig()
1153
1193
  };
1154
1194
 
1155
1195
  if ((styleSet || null) != null) {
@@ -1354,7 +1394,7 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
1354
1394
 
1355
1395
  var _frontendPagination = _objectSpread(_objectSpread({}, {
1356
1396
  frontendPagination: false
1357
- }), _this.establishViewPaginationConfig() || {}),
1397
+ }), _this.establishTableAdditionalConfig() || {}),
1358
1398
  frontendPagination = _frontendPagination.frontendPagination;
1359
1399
 
1360
1400
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -16,9 +16,5 @@ declare class MultiPage extends Base {
16
16
  afterGetFirstRequestResult: (submitData: any, responseData: any) => void;
17
17
  adjustRenderLoadRequestParamsWithKey: (d: any) => void;
18
18
  afterGetRequestResult: () => void;
19
- handleStandardTableChange: (pagination: any, filtersArg: any, sorter: any) => void;
20
- handlePaginationChange: (page: any, pageSize: any) => void;
21
- handleListViewPaginationChange: (page: any, pageSize: any) => void;
22
- handlePaginationShowSizeChange: (current: any, size: any) => void;
23
19
  }
24
20
  import Base from "../../DataListView/Base";
@@ -261,7 +261,7 @@ var MultiPage = /*#__PURE__*/function (_Base) {
261
261
  var filters = Object.keys(filtersArg).reduce(function (obj, key) {
262
262
  var newObj = _objectSpread({}, obj);
263
263
 
264
- newObj[key] = (0, _tools.getValue)(filtersArg[key]);
264
+ newObj[key] = getValue(filtersArg[key]);
265
265
  return newObj;
266
266
  }, {});
267
267
  var params = {
@@ -278,16 +278,11 @@ var MultiPage = /*#__PURE__*/function (_Base) {
278
278
  }
279
279
 
280
280
  _this.pageListData(params);
281
- };
282
281
 
283
- _this.handlePaginationChange = function (page, pageSize) {
284
- _this.handleStandardTableChange({
285
- current: page,
286
- pageSize: pageSize
287
- }, {}, {});
282
+ _this.handleAdditionalStandardTableChange(pagination, filtersArg, sorter);
288
283
  };
289
284
 
290
- _this.handleListViewPaginationChange = function (page, pageSize) {
285
+ _this.handlePaginationChange = function (page, pageSize) {
291
286
  if (_this.checkWorkDoing()) {
292
287
  return;
293
288
  }
@@ -300,17 +295,8 @@ var MultiPage = /*#__PURE__*/function (_Base) {
300
295
  };
301
296
 
302
297
  _this.pageListData(params);
303
- };
304
298
 
305
- _this.handlePaginationShowSizeChange = function (current, size) {
306
- _this.setState({
307
- pageNo: 1
308
- });
309
-
310
- _this.handleStandardTableChange({
311
- current: 1,
312
- pageSize: size
313
- }, {}, {});
299
+ _this.handleAdditionalPaginationChange(page, pageSize);
314
300
  };
315
301
 
316
302
  _this.establishViewDataSource = function () {
@@ -334,33 +320,18 @@ var MultiPage = /*#__PURE__*/function (_Base) {
334
320
 
335
321
  var paginationConfig = _objectSpread({}, pagination);
336
322
 
337
- paginationConfig.onChange = _this.handleListViewPaginationChange;
338
323
  return paginationConfig;
339
324
  };
340
325
 
341
326
  _this.renderPaginationView = function () {
342
- var _this$state3 = _this.state,
343
- pageNo = _this$state3.pageNo,
344
- pageSize = _this$state3.pageSize;
327
+ var paginationConfig = _this.supplementPaginationConfig();
345
328
 
346
- var paginationConfig = _this.establishViewPaginationConfig();
347
-
348
- paginationConfig.onChange = _this.handleListViewPaginationChange;
349
329
  return /*#__PURE__*/_react["default"].createElement(_FlexBox["default"], {
350
330
  style: {
351
331
  paddingTop: 16,
352
332
  paddingBottom: 16
353
333
  },
354
- right: /*#__PURE__*/_react["default"].createElement(_pagination2["default"], _extends({
355
- current: pageNo,
356
- pageSize: pageSize,
357
- size: "small",
358
- showSizeChanger: true,
359
- showQuickJumper: true,
360
- showTotal: function showTotal(total) {
361
- return "\u5171 ".concat(total, " \u6761\u4FE1\u606F");
362
- }
363
- }, paginationConfig, {
334
+ right: /*#__PURE__*/_react["default"].createElement(_pagination2["default"], _extends({}, paginationConfig, {
364
335
  onChange: function onChange(page, size) {
365
336
  _this.handlePaginationChange(page, size);
366
337
  },
@@ -7,5 +7,6 @@ declare class SinglePage extends Base {
7
7
  */
8
8
  adjustLoadRequestParams: (o: any) => any;
9
9
  initLoadRequestParams: (o?: {}) => any;
10
+ getFrontendPageNo: () => number;
10
11
  }
11
12
  import Base from "../../DataListView/Base";
@@ -174,9 +174,31 @@ var SinglePage = /*#__PURE__*/function (_Base) {
174
174
  return list;
175
175
  };
176
176
 
177
+ _this.establishTableAdditionalConfig = function () {
178
+ return {
179
+ //前台模拟分页,有助于优化长列表页面交互操作导致的延迟
180
+ frontendPagination: true
181
+ };
182
+ };
183
+
184
+ _this.handleAdditionalStandardTableChange = function (pagination, filtersArg, sorter) {
185
+ var frontendPageNo = pagination.current;
186
+
187
+ _this.setState({
188
+ frontendPageNo: (0, _tools.toNumber)(frontendPageNo)
189
+ });
190
+ };
191
+
192
+ _this.getFrontendPageNo = function () {
193
+ var frontendPageNo = _this.state.frontendPageNo;
194
+ return (0, _tools.toNumber)(frontendPageNo);
195
+ };
196
+
177
197
  _this.lastLoadParams = null;
178
198
  var defaultState = (0, _tools.defaultListState)();
179
- _this.state = _objectSpread(_objectSpread({}, _this.state), defaultState);
199
+ _this.state = _objectSpread(_objectSpread(_objectSpread({}, _this.state), defaultState), {
200
+ frontendPageNo: 1
201
+ });
180
202
  return _this;
181
203
  }
182
204
 
@@ -247,6 +247,10 @@ var drawerConfig = {
247
247
  component: 'component'
248
248
  }
249
249
  };
250
+ /**
251
+ * card配置集合
252
+ */
253
+
250
254
  exports.drawerConfig = drawerConfig;
251
255
 
252
256
  var cardConfig = _objectSpread(_objectSpread({}, contentConfig), {}, {
@@ -74,6 +74,8 @@ export function defaultListState(): {
74
74
  x: number;
75
75
  };
76
76
  formValues: {};
77
+ pageNo: number;
78
+ pageSize: number;
77
79
  startTimeAlias: string;
78
80
  endTimeAlias: string;
79
81
  startTime: string;
package/es/utils/tools.js CHANGED
@@ -236,6 +236,8 @@ function defaultListState() {
236
236
  x: 1520
237
237
  },
238
238
  formValues: {},
239
+ pageNo: 1,
240
+ pageSize: 10,
239
241
  startTimeAlias: '',
240
242
  endTimeAlias: '',
241
243
  startTime: '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-management-fast-framework",
3
- "version": "1.2.18",
3
+ "version": "1.2.29",
4
4
  "description": "antd-management-fast-framework",
5
5
  "keywords": [
6
6
  "antd-management-fast-framework"