wargerm 0.7.48 → 0.7.50
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 +21 -8
- package/dist/index.js +21 -8
- package/package.json +1 -1
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();
|
@@ -7183,6 +7184,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7183
7184
|
setModalFormConfig = _useState4[1];
|
7184
7185
|
|
7185
7186
|
var formSearchRef = useRef({});
|
7187
|
+
var tableRequestParmas = useRef({});
|
7186
7188
|
var modalFormColumn = deepCopy(columns) || [];
|
7187
7189
|
var formSearchColumn = deepCopy(columns) || [];
|
7188
7190
|
useImperativeHandle(ref, function () {
|
@@ -7613,7 +7615,8 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7613
7615
|
return {
|
7614
7616
|
config: omit(item, ['type', 'actionMethod', 'actionRender']),
|
7615
7617
|
children: (_item$actionRender2 = item.actionRender) === null || _item$actionRender2 === void 0 ? void 0 : _item$actionRender2.call(item, actionRef, function () {
|
7616
|
-
|
7618
|
+
searchFormRef.current;
|
7619
|
+
item.actionMethod && item.actionMethod(tableRequestParmas.current, function () {
|
7617
7620
|
var _actionRef$current5;
|
7618
7621
|
|
7619
7622
|
return actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : _actionRef$current5.reload();
|
@@ -7824,13 +7827,14 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7824
7827
|
while (1) {
|
7825
7828
|
switch (_context9.prev = _context9.next) {
|
7826
7829
|
case 0:
|
7827
|
-
|
7828
|
-
|
7830
|
+
tableRequestParmas.current = _objectSpread2(_objectSpread2({}, params), formSearchRef.current);
|
7831
|
+
_context9.next = 3;
|
7832
|
+
return _request(tableRequestParmas.current);
|
7829
7833
|
|
7830
|
-
case
|
7834
|
+
case 3:
|
7831
7835
|
return _context9.abrupt("return", _context9.sent);
|
7832
7836
|
|
7833
|
-
case
|
7837
|
+
case 4:
|
7834
7838
|
case "end":
|
7835
7839
|
return _context9.stop();
|
7836
7840
|
}
|
@@ -7845,7 +7849,16 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7845
7849
|
return request;
|
7846
7850
|
}()
|
7847
7851
|
} : {}), {}, {
|
7848
|
-
columns:
|
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) {
|
7849
7862
|
if (column.type == 'group') {
|
7850
7863
|
return [].concat(_toConsumableArray(pre), _toConsumableArray(column.children));
|
7851
7864
|
} else {
|
@@ -7877,7 +7890,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7877
7890
|
}
|
7878
7891
|
|
7879
7892
|
return obj;
|
7880
|
-
}),
|
7893
|
+
}))),
|
7881
7894
|
search: false,
|
7882
7895
|
pagination: pagination !== null && pagination !== void 0 ? pagination : {
|
7883
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();
|
@@ -7227,6 +7228,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7227
7228
|
setModalFormConfig = _useState4[1];
|
7228
7229
|
|
7229
7230
|
var formSearchRef = React.useRef({});
|
7231
|
+
var tableRequestParmas = React.useRef({});
|
7230
7232
|
var modalFormColumn = deepCopy(columns) || [];
|
7231
7233
|
var formSearchColumn = deepCopy(columns) || [];
|
7232
7234
|
React.useImperativeHandle(ref, function () {
|
@@ -7657,7 +7659,8 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7657
7659
|
return {
|
7658
7660
|
config: lodashEs.omit(item, ['type', 'actionMethod', 'actionRender']),
|
7659
7661
|
children: (_item$actionRender2 = item.actionRender) === null || _item$actionRender2 === void 0 ? void 0 : _item$actionRender2.call(item, actionRef, function () {
|
7660
|
-
|
7662
|
+
searchFormRef.current;
|
7663
|
+
item.actionMethod && item.actionMethod(tableRequestParmas.current, function () {
|
7661
7664
|
var _actionRef$current5;
|
7662
7665
|
|
7663
7666
|
return actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : _actionRef$current5.reload();
|
@@ -7868,13 +7871,14 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7868
7871
|
while (1) {
|
7869
7872
|
switch (_context9.prev = _context9.next) {
|
7870
7873
|
case 0:
|
7871
|
-
|
7872
|
-
|
7874
|
+
tableRequestParmas.current = _objectSpread2(_objectSpread2({}, params), formSearchRef.current);
|
7875
|
+
_context9.next = 3;
|
7876
|
+
return _request(tableRequestParmas.current);
|
7873
7877
|
|
7874
|
-
case
|
7878
|
+
case 3:
|
7875
7879
|
return _context9.abrupt("return", _context9.sent);
|
7876
7880
|
|
7877
|
-
case
|
7881
|
+
case 4:
|
7878
7882
|
case "end":
|
7879
7883
|
return _context9.stop();
|
7880
7884
|
}
|
@@ -7889,7 +7893,16 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7889
7893
|
return request;
|
7890
7894
|
}()
|
7891
7895
|
} : {}), {}, {
|
7892
|
-
columns:
|
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) {
|
7893
7906
|
if (column.type == 'group') {
|
7894
7907
|
return [].concat(_toConsumableArray(pre), _toConsumableArray(column.children));
|
7895
7908
|
} else {
|
@@ -7921,7 +7934,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7921
7934
|
}
|
7922
7935
|
|
7923
7936
|
return obj;
|
7924
|
-
}),
|
7937
|
+
}))),
|
7925
7938
|
search: false,
|
7926
7939
|
pagination: pagination !== null && pagination !== void 0 ? pagination : {
|
7927
7940
|
pageSize: 20
|