wargerm 0.7.71 → 0.7.73

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
@@ -3960,6 +3960,19 @@ var WForm = function WForm(props, ref) {
3960
3960
  var handleSearch = function handleSearch(isfirst) {
3961
3961
  var searchForm = form.getFieldsValue();
3962
3962
  filterFormColumns.forEach(function (c) {
3963
+ if (c.type == 'group') {
3964
+ var _c$children3;
3965
+ c.children = (_c$children3 = c.children) === null || _c$children3 === void 0 ? void 0 : _c$children3.forEach(function (itm) {
3966
+ if (itm.search && itm.search.transform) {
3967
+ var transformObj = itm.search.transform(searchForm[itm.dataIndex]);
3968
+ if (transformObj[itm.dataIndex] == undefined) {
3969
+ delete searchForm[itm.dataIndex];
3970
+ }
3971
+ searchForm = _objectSpread2(_objectSpread2({}, searchForm), transformObj);
3972
+ return false;
3973
+ }
3974
+ });
3975
+ }
3963
3976
  if (c.search && c.search.transform) {
3964
3977
  var transformObj = c.search.transform(searchForm[c.dataIndex]);
3965
3978
  if (transformObj[c.dataIndex] == undefined) {
@@ -4005,6 +4018,19 @@ var WForm = function WForm(props, ref) {
4005
4018
  var getFormValues = function getFormValues() {
4006
4019
  var searchForm = form.getFieldsValue();
4007
4020
  filterFormColumns.forEach(function (c) {
4021
+ if (c.type == 'group') {
4022
+ var _c$children4;
4023
+ c.children = (_c$children4 = c.children) === null || _c$children4 === void 0 ? void 0 : _c$children4.forEach(function (itm) {
4024
+ if (itm.search && itm.search.transform) {
4025
+ var transformObj = itm.search.transform(searchForm[itm.dataIndex]);
4026
+ searchForm = _objectSpread2(_objectSpread2({}, searchForm), transformObj);
4027
+ if (!transformObj[itm.dataIndex]) {
4028
+ delete searchForm[itm.dataIndex];
4029
+ }
4030
+ return false;
4031
+ }
4032
+ });
4033
+ }
4008
4034
  if (c.search && c.search.transform) {
4009
4035
  var transformObj = c.search.transform(searchForm[c.dataIndex]);
4010
4036
  searchForm = _objectSpread2(_objectSpread2({}, searchForm), transformObj);
@@ -4062,6 +4088,19 @@ var WForm = function WForm(props, ref) {
4062
4088
  var _form$setFieldsValue4;
4063
4089
  var setFieldsValues = _objectSpread2({}, record);
4064
4090
  filterFormColumns.forEach(function (c) {
4091
+ if (c.type == 'group') {
4092
+ var _c$children5;
4093
+ c.children = (_c$children5 = c.children) === null || _c$children5 === void 0 ? void 0 : _c$children5.forEach(function (itm) {
4094
+ if (itm.search && itm.search.transformSetForm) {
4095
+ var transformObj = itm.search.transformSetForm(setFieldsValues[itm.dataIndex], setFieldsValues);
4096
+ setFieldsValues = _objectSpread2(_objectSpread2({}, setFieldsValues), transformObj);
4097
+ if (!transformObj[itm.dataIndex]) {
4098
+ delete setFieldsValues[itm.dataIndex];
4099
+ }
4100
+ return false;
4101
+ }
4102
+ });
4103
+ }
4065
4104
  if (c.search && c.search.transformSetForm) {
4066
4105
  var transformObj = c.search.transformSetForm(setFieldsValues[c.dataIndex], setFieldsValues);
4067
4106
  setFieldsValues = _objectSpread2(_objectSpread2({}, setFieldsValues), transformObj);
@@ -6667,7 +6706,7 @@ var ModalForm = function ModalForm(props, ref) {
6667
6706
  });
6668
6707
  case 4:
6669
6708
  res = _context2.sent;
6670
- if (res.code == 200) {
6709
+ if ((res === null || res === void 0 ? void 0 : res.code) == 200) {
6671
6710
  setOpen(false);
6672
6711
  onCancel && onCancel();
6673
6712
  }
@@ -6817,7 +6856,7 @@ var TabelCard = function TabelCard(props, ref) {
6817
6856
  }, record);
6818
6857
  case 3:
6819
6858
  res = _context2.sent;
6820
- if (res.code == 200) {
6859
+ if ((res === null || res === void 0 ? void 0 : res.code) == 200) {
6821
6860
  loading();
6822
6861
  actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : _actionRef$current2.reload();
6823
6862
  }
@@ -7109,7 +7148,7 @@ var TabelCard = function TabelCard(props, ref) {
7109
7148
  });
7110
7149
  case 3:
7111
7150
  res = _context8.sent;
7112
- if (res.code == 200) {
7151
+ if ((res === null || res === void 0 ? void 0 : res.code) == 200) {
7113
7152
  loading(); // 关闭弹窗
7114
7153
  actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : _actionRef$current7.reload();
7115
7154
  }
package/dist/index.js CHANGED
@@ -4004,6 +4004,19 @@ var WForm = function WForm(props, ref) {
4004
4004
  var handleSearch = function handleSearch(isfirst) {
4005
4005
  var searchForm = form.getFieldsValue();
4006
4006
  filterFormColumns.forEach(function (c) {
4007
+ if (c.type == 'group') {
4008
+ var _c$children3;
4009
+ c.children = (_c$children3 = c.children) === null || _c$children3 === void 0 ? void 0 : _c$children3.forEach(function (itm) {
4010
+ if (itm.search && itm.search.transform) {
4011
+ var transformObj = itm.search.transform(searchForm[itm.dataIndex]);
4012
+ if (transformObj[itm.dataIndex] == undefined) {
4013
+ delete searchForm[itm.dataIndex];
4014
+ }
4015
+ searchForm = _objectSpread2(_objectSpread2({}, searchForm), transformObj);
4016
+ return false;
4017
+ }
4018
+ });
4019
+ }
4007
4020
  if (c.search && c.search.transform) {
4008
4021
  var transformObj = c.search.transform(searchForm[c.dataIndex]);
4009
4022
  if (transformObj[c.dataIndex] == undefined) {
@@ -4049,6 +4062,19 @@ var WForm = function WForm(props, ref) {
4049
4062
  var getFormValues = function getFormValues() {
4050
4063
  var searchForm = form.getFieldsValue();
4051
4064
  filterFormColumns.forEach(function (c) {
4065
+ if (c.type == 'group') {
4066
+ var _c$children4;
4067
+ c.children = (_c$children4 = c.children) === null || _c$children4 === void 0 ? void 0 : _c$children4.forEach(function (itm) {
4068
+ if (itm.search && itm.search.transform) {
4069
+ var transformObj = itm.search.transform(searchForm[itm.dataIndex]);
4070
+ searchForm = _objectSpread2(_objectSpread2({}, searchForm), transformObj);
4071
+ if (!transformObj[itm.dataIndex]) {
4072
+ delete searchForm[itm.dataIndex];
4073
+ }
4074
+ return false;
4075
+ }
4076
+ });
4077
+ }
4052
4078
  if (c.search && c.search.transform) {
4053
4079
  var transformObj = c.search.transform(searchForm[c.dataIndex]);
4054
4080
  searchForm = _objectSpread2(_objectSpread2({}, searchForm), transformObj);
@@ -4106,6 +4132,19 @@ var WForm = function WForm(props, ref) {
4106
4132
  var _form$setFieldsValue4;
4107
4133
  var setFieldsValues = _objectSpread2({}, record);
4108
4134
  filterFormColumns.forEach(function (c) {
4135
+ if (c.type == 'group') {
4136
+ var _c$children5;
4137
+ c.children = (_c$children5 = c.children) === null || _c$children5 === void 0 ? void 0 : _c$children5.forEach(function (itm) {
4138
+ if (itm.search && itm.search.transformSetForm) {
4139
+ var transformObj = itm.search.transformSetForm(setFieldsValues[itm.dataIndex], setFieldsValues);
4140
+ setFieldsValues = _objectSpread2(_objectSpread2({}, setFieldsValues), transformObj);
4141
+ if (!transformObj[itm.dataIndex]) {
4142
+ delete setFieldsValues[itm.dataIndex];
4143
+ }
4144
+ return false;
4145
+ }
4146
+ });
4147
+ }
4109
4148
  if (c.search && c.search.transformSetForm) {
4110
4149
  var transformObj = c.search.transformSetForm(setFieldsValues[c.dataIndex], setFieldsValues);
4111
4150
  setFieldsValues = _objectSpread2(_objectSpread2({}, setFieldsValues), transformObj);
@@ -6711,7 +6750,7 @@ var ModalForm = function ModalForm(props, ref) {
6711
6750
  });
6712
6751
  case 4:
6713
6752
  res = _context2.sent;
6714
- if (res.code == 200) {
6753
+ if ((res === null || res === void 0 ? void 0 : res.code) == 200) {
6715
6754
  setOpen(false);
6716
6755
  onCancel && onCancel();
6717
6756
  }
@@ -6861,7 +6900,7 @@ var TabelCard = function TabelCard(props, ref) {
6861
6900
  }, record);
6862
6901
  case 3:
6863
6902
  res = _context2.sent;
6864
- if (res.code == 200) {
6903
+ if ((res === null || res === void 0 ? void 0 : res.code) == 200) {
6865
6904
  loading();
6866
6905
  actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : _actionRef$current2.reload();
6867
6906
  }
@@ -7153,7 +7192,7 @@ var TabelCard = function TabelCard(props, ref) {
7153
7192
  });
7154
7193
  case 3:
7155
7194
  res = _context8.sent;
7156
- if (res.code == 200) {
7195
+ if ((res === null || res === void 0 ? void 0 : res.code) == 200) {
7157
7196
  loading(); // 关闭弹窗
7158
7197
  actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : _actionRef$current7.reload();
7159
7198
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.7.71",
4
+ "version": "0.7.73",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",