wargerm 0.7.49 → 0.7.51

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.
package/dist/index.esm.js CHANGED
@@ -7146,7 +7146,7 @@ var ModalForm = function ModalForm(props, ref) {
7146
7146
 
7147
7147
  var ModalForm$1 = /*#__PURE__*/React.forwardRef(ModalForm);
7148
7148
 
7149
- var _excluded$l = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "fliterAction", "renderTableBar", "renderTableBarDeps", "className", "style", "onFormChange", "modalConfig", "searchFormConfig", "optionColumnConfig", "pagination", "noBordered"];
7149
+ var _excluded$l = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "fliterAction", "renderTableBar", "renderTableBarDeps", "className", "style", "onFormChange", "modalConfig", "searchFormConfig", "optionColumnConfig", "pagination", "noBordered", "showIndex"];
7150
7150
 
7151
7151
  var TabelCard = function TabelCard(props, ref) {
7152
7152
  var columns = props.columns,
@@ -7166,6 +7166,7 @@ var TabelCard = function TabelCard(props, ref) {
7166
7166
  optionColumnConfig = props.optionColumnConfig,
7167
7167
  pagination = props.pagination,
7168
7168
  noBordered = props.noBordered,
7169
+ showIndex = props.showIndex,
7169
7170
  extraProps = _objectWithoutProperties(props, _excluded$l);
7170
7171
 
7171
7172
  var actionRef = useRef();
@@ -7848,7 +7849,16 @@ var TabelCard = function TabelCard(props, ref) {
7848
7849
  return request;
7849
7850
  }()
7850
7851
  } : {}), {}, {
7851
- columns: tableAction && (tableAction === null || tableAction === void 0 ? void 0 : tableAction.length) > 0 ? [].concat(_toConsumableArray((columns || []).reduce(function (pre, column) {
7852
+ columns: [showIndex ? {
7853
+ title: '序号',
7854
+ align: 'center',
7855
+ hideInSearch: true,
7856
+ hiddenInModalForm: true,
7857
+ width: 60,
7858
+ render: function render(text, record, index) {
7859
+ return index + 1;
7860
+ }
7861
+ } : {}].concat(_toConsumableArray(tableAction && (tableAction === null || tableAction === void 0 ? void 0 : tableAction.length) > 0 ? [].concat(_toConsumableArray((columns || []).reduce(function (pre, column) {
7852
7862
  if (column.type == 'group') {
7853
7863
  return [].concat(_toConsumableArray(pre), _toConsumableArray(column.children));
7854
7864
  } else {
@@ -7880,7 +7890,7 @@ var TabelCard = function TabelCard(props, ref) {
7880
7890
  }
7881
7891
 
7882
7892
  return obj;
7883
- }),
7893
+ }))),
7884
7894
  search: false,
7885
7895
  pagination: pagination !== null && pagination !== void 0 ? pagination : {
7886
7896
  pageSize: 20
package/dist/index.js CHANGED
@@ -7190,7 +7190,7 @@ var ModalForm = function ModalForm(props, ref) {
7190
7190
 
7191
7191
  var ModalForm$1 = /*#__PURE__*/React__default['default'].forwardRef(ModalForm);
7192
7192
 
7193
- var _excluded$l = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "fliterAction", "renderTableBar", "renderTableBarDeps", "className", "style", "onFormChange", "modalConfig", "searchFormConfig", "optionColumnConfig", "pagination", "noBordered"];
7193
+ var _excluded$l = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "fliterAction", "renderTableBar", "renderTableBarDeps", "className", "style", "onFormChange", "modalConfig", "searchFormConfig", "optionColumnConfig", "pagination", "noBordered", "showIndex"];
7194
7194
 
7195
7195
  var TabelCard = function TabelCard(props, ref) {
7196
7196
  var columns = props.columns,
@@ -7210,6 +7210,7 @@ var TabelCard = function TabelCard(props, ref) {
7210
7210
  optionColumnConfig = props.optionColumnConfig,
7211
7211
  pagination = props.pagination,
7212
7212
  noBordered = props.noBordered,
7213
+ showIndex = props.showIndex,
7213
7214
  extraProps = _objectWithoutProperties(props, _excluded$l);
7214
7215
 
7215
7216
  var actionRef = React.useRef();
@@ -7892,7 +7893,16 @@ var TabelCard = function TabelCard(props, ref) {
7892
7893
  return request;
7893
7894
  }()
7894
7895
  } : {}), {}, {
7895
- columns: tableAction && (tableAction === null || tableAction === void 0 ? void 0 : tableAction.length) > 0 ? [].concat(_toConsumableArray((columns || []).reduce(function (pre, column) {
7896
+ columns: [showIndex ? {
7897
+ title: '序号',
7898
+ align: 'center',
7899
+ hideInSearch: true,
7900
+ hiddenInModalForm: true,
7901
+ width: 60,
7902
+ render: function render(text, record, index) {
7903
+ return index + 1;
7904
+ }
7905
+ } : {}].concat(_toConsumableArray(tableAction && (tableAction === null || tableAction === void 0 ? void 0 : tableAction.length) > 0 ? [].concat(_toConsumableArray((columns || []).reduce(function (pre, column) {
7896
7906
  if (column.type == 'group') {
7897
7907
  return [].concat(_toConsumableArray(pre), _toConsumableArray(column.children));
7898
7908
  } else {
@@ -7924,7 +7934,7 @@ var TabelCard = function TabelCard(props, ref) {
7924
7934
  }
7925
7935
 
7926
7936
  return obj;
7927
- }),
7937
+ }))),
7928
7938
  search: false,
7929
7939
  pagination: pagination !== null && pagination !== void 0 ? pagination : {
7930
7940
  pageSize: 20
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.7.49",
4
+ "version": "0.7.51",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",