wargerm 0.2.18 → 0.2.22

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
@@ -5,7 +5,7 @@ import _Dropdown from 'antd/es/dropdown';
5
5
  import 'antd/es/menu/style';
6
6
  import _Menu from 'antd/es/menu';
7
7
  import React, { useState, useEffect, useMemo, useImperativeHandle, useRef } from 'react';
8
- import { createFromIconfontCN, SearchOutlined, ReloadOutlined, CloseCircleOutlined, PlusOutlined, EditOutlined, EyeOutlined, ExclamationCircleOutlined, DeleteOutlined } from '@ant-design/icons';
8
+ import { createFromIconfontCN, SearchOutlined, ReloadOutlined, CloseCircleOutlined, PlusOutlined, ExclamationCircleOutlined, MoreOutlined, EyeOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons';
9
9
  import 'antd/es/input/style';
10
10
  import _Input from 'antd/es/input';
11
11
  import 'antd/es/input-number/style';
@@ -44,7 +44,7 @@ import _Breadcrumb from 'antd/es/breadcrumb';
44
44
  import ReactDOM from 'react-dom';
45
45
  import 'antd/es/modal/style';
46
46
  import _Modal from 'antd/es/modal';
47
- import ProTable from '@ant-design/pro-table';
47
+ import ProTable, { TableDropdown } from '@ant-design/pro-table';
48
48
 
49
49
  function ownKeys(object, enumerableOnly) {
50
50
  var keys = Object.keys(object);
@@ -8700,7 +8700,7 @@ var WForm = function WForm(props, ref) {
8700
8700
  var WForm$1 = /*#__PURE__*/React.forwardRef(WForm);
8701
8701
 
8702
8702
  var _excluded$7 = ["height", "width", "count", "style", "numberStyle"],
8703
- _excluded2$2 = ["count", "width", "height", "marginRight"];
8703
+ _excluded2$2 = ["count", "numberCount", "width", "height", "marginRight"];
8704
8704
 
8705
8705
  var Number = function Number(_ref) {
8706
8706
  var height = _ref.height,
@@ -8831,6 +8831,8 @@ Number.defaultProps = {
8831
8831
 
8832
8832
  var Index$7 = function Index(props) {
8833
8833
  var count = props.count,
8834
+ _props$numberCount = props.numberCount,
8835
+ numberCount = _props$numberCount === void 0 ? 5 : _props$numberCount,
8834
8836
  width = props.width,
8835
8837
  height = props.height,
8836
8838
  _props$marginRight = props.marginRight,
@@ -8844,6 +8846,11 @@ var Index$7 = function Index(props) {
8844
8846
 
8845
8847
  useEffect(function () {
8846
8848
  var countArray = count.toString().split('');
8849
+
8850
+ if (numberCount > countArray.length) {
8851
+ countArray = [].concat(_toConsumableArray(Array(numberCount - countArray.length).fill(0)), _toConsumableArray(countArray));
8852
+ }
8853
+
8847
8854
  setNumberList(countArray.map(function (num) {
8848
8855
  return +num;
8849
8856
  }));
@@ -9040,26 +9047,34 @@ var Index$9 = function Index(_ref) {
9040
9047
  }
9041
9048
  };
9042
9049
 
9043
- var _excluded$a = ["data", "onClick", "renderItem"];
9050
+ var _excluded$a = ["data", "onClick", "isPreventClick", "renderItem"];
9044
9051
 
9045
9052
  SwiperCore.use([Pagination, Navigation, Autoplay]);
9046
9053
 
9047
9054
  var Index$a = function Index(props) {
9048
9055
  var data = props.data,
9049
9056
  _onClick = props.onClick,
9057
+ isPreventClick = props.isPreventClick,
9050
9058
  renderItem = props.renderItem,
9051
9059
  extraProps = _objectWithoutProperties(props, _excluded$a);
9052
9060
 
9053
- return /*#__PURE__*/React.createElement(Swiper, _objectSpread2({
9054
- onClick: function onClick(swiper, event) {
9055
- if (swiper.clickedIndex - 4 > data.length) {
9056
- swiper.slideNext();
9057
- } else {
9058
- swiper.clickedIndex && swiper.slideTo(swiper.clickedIndex);
9059
- }
9061
+ var _useState = useState(null),
9062
+ _useState2 = _slicedToArray(_useState, 2),
9063
+ controlledSwiper = _useState2[0],
9064
+ setControlledSwiper = _useState2[1];
9060
9065
 
9061
- _onClick && _onClick(swiper, event);
9066
+ return /*#__PURE__*/React.createElement(Swiper, _objectSpread2({
9067
+ onSwiper: function onSwiper(swiper) {
9068
+ return setControlledSwiper(swiper);
9062
9069
  },
9070
+ // onClick={(swiper, event) => {
9071
+ // if (swiper.clickedIndex - 4 > data.length) {
9072
+ // swiper.slideNext();
9073
+ // } else {
9074
+ // swiper.clickedIndex && swiper.slideTo(swiper.clickedIndex);
9075
+ // }
9076
+ // onClick && onClick(swiper, event);
9077
+ // }}
9063
9078
  className: "mySwiper",
9064
9079
  slidesPerView: 4,
9065
9080
  spaceBetween: 30,
@@ -9072,7 +9087,23 @@ var Index$a = function Index(props) {
9072
9087
  key: index
9073
9088
  }, function (_ref) {
9074
9089
  var isActive = _ref.isActive;
9075
- return renderItem(item, index, isActive);
9090
+ return /*#__PURE__*/React.createElement("div", {
9091
+ style: {
9092
+ width: '100%',
9093
+ height: '100%'
9094
+ },
9095
+ onClick: function onClick(event) {
9096
+ if (controlledSwiper) {
9097
+ if (controlledSwiper.clickedIndex - 4 > data.length) {
9098
+ controlledSwiper.slideNext();
9099
+ } else {
9100
+ controlledSwiper.clickedIndex && controlledSwiper.slideTo(controlledSwiper.clickedIndex);
9101
+ }
9102
+
9103
+ _onClick && _onClick(controlledSwiper, event);
9104
+ }
9105
+ }
9106
+ }, renderItem(item, index, isActive));
9076
9107
  });
9077
9108
  }));
9078
9109
  };
@@ -9199,7 +9230,9 @@ function invariant(condition, message) {
9199
9230
  if (isProduction$1) {
9200
9231
  throw new Error(prefix);
9201
9232
  }
9202
- throw new Error(prefix + ": " + (message || ''));
9233
+ var provided = typeof message === 'function' ? message() : message;
9234
+ var value = provided ? prefix + ": " + provided : prefix;
9235
+ throw new Error(value);
9203
9236
  }
9204
9237
 
9205
9238
  function addLeadingSlash(path) {
@@ -9786,7 +9819,7 @@ function DialogModel(props) {
9786
9819
  height: '100%',
9787
9820
  position: 'relative'
9788
9821
  }
9789
- }, ' ', props.children, ' '))), /*#__PURE__*/React.createElement("div", {
9822
+ }, props.children))), /*#__PURE__*/React.createElement("div", {
9790
9823
  className: 'mask',
9791
9824
  onClick: function onClick() {
9792
9825
  return onClose && onClose();
@@ -9905,7 +9938,9 @@ var Modal = /*#__PURE__*/function (_React$PureComponent) {
9905
9938
  style: style
9906
9939
  }, this.renderTop(), /*#__PURE__*/React.createElement("div", {
9907
9940
  className: "model-content"
9908
- }, this.renderContent()), this.renderFooter());
9941
+ }, /*#__PURE__*/React.createElement("div", {
9942
+ className: "model-content-in"
9943
+ }, this.renderContent())), this.renderFooter());
9909
9944
  }
9910
9945
  }]);
9911
9946
 
@@ -10117,7 +10152,8 @@ var ModalForm = function ModalForm(props, ref) {
10117
10152
 
10118
10153
  var ModalForm$1 = /*#__PURE__*/React.forwardRef(ModalForm);
10119
10154
 
10120
- var _excluded$f = ["columns", "extraColumns", "request", "modalFormSearch", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig"];
10155
+ var _excluded$f = ["columns", "extraColumns", "request", "modalFormSearch", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig"],
10156
+ _excluded2$3 = ["actionMethod"];
10121
10157
 
10122
10158
  var TabelCard = function TabelCard(props, ref) {
10123
10159
  var columns = props.columns,
@@ -10158,164 +10194,243 @@ var TabelCard = function TabelCard(props, ref) {
10158
10194
  setModalFormConfig(options);
10159
10195
  };
10160
10196
 
10161
- var tableActionDom = function tableActionDom(record, index) {
10162
- return tableAction === null || tableAction === void 0 ? void 0 : tableAction.map(function (item) {
10163
- if (item.type === 'edit') {
10164
- return /*#__PURE__*/React.createElement(_Tooltip, {
10165
- title: "\u7F16\u8F91",
10166
- key: "edit"
10167
- }, /*#__PURE__*/React.createElement("a", {
10168
- key: "editable",
10169
- onClick: function onClick() {
10170
- return openFormModel({
10171
- type: '编辑',
10172
- record: record,
10173
- modalOnOk: function () {
10174
- var _modalOnOk = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(values, loading) {
10175
- return regeneratorRuntime.wrap(function _callee$(_context) {
10176
- while (1) {
10177
- switch (_context.prev = _context.next) {
10178
- case 0:
10179
- if (!item.actionMethod) {
10180
- _context.next = 3;
10181
- break;
10182
- }
10183
-
10184
- _context.next = 3;
10185
- return item.actionMethod(values, function () {
10186
- var _actionRef$current;
10197
+ var actionHandler = {
10198
+ view: function view(item, record, index) {
10199
+ openFormModel({
10200
+ type: '查看',
10201
+ record: record,
10202
+ modalOnOk: function () {
10203
+ var _modalOnOk = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
10204
+ return regeneratorRuntime.wrap(function _callee$(_context) {
10205
+ while (1) {
10206
+ switch (_context.prev = _context.next) {
10207
+ case 0:
10208
+ case "end":
10209
+ return _context.stop();
10210
+ }
10211
+ }
10212
+ }, _callee);
10213
+ }));
10187
10214
 
10188
- loading();
10189
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : _actionRef$current.reload();
10190
- }, record);
10215
+ function modalOnOk() {
10216
+ return _modalOnOk.apply(this, arguments);
10217
+ }
10191
10218
 
10192
- case 3:
10193
- case "end":
10194
- return _context.stop();
10195
- }
10219
+ return modalOnOk;
10220
+ }(),
10221
+ index: index
10222
+ });
10223
+ },
10224
+ edit: function edit(item, record, index) {
10225
+ openFormModel({
10226
+ type: '编辑',
10227
+ record: record,
10228
+ modalOnOk: function () {
10229
+ var _modalOnOk2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(values, loading) {
10230
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
10231
+ while (1) {
10232
+ switch (_context2.prev = _context2.next) {
10233
+ case 0:
10234
+ if (!item.actionMethod) {
10235
+ _context2.next = 3;
10236
+ break;
10196
10237
  }
10197
- }, _callee);
10198
- }));
10199
10238
 
10200
- function modalOnOk(_x, _x2) {
10201
- return _modalOnOk.apply(this, arguments);
10202
- }
10239
+ _context2.next = 3;
10240
+ return item.actionMethod(values, function () {
10241
+ var _actionRef$current;
10203
10242
 
10204
- return modalOnOk;
10205
- }(),
10206
- index: index
10207
- });
10208
- }
10209
- }, /*#__PURE__*/React.createElement(EditOutlined, null), " \u7F16\u8F91"));
10210
- } else if (item.type === 'view') {
10211
- return /*#__PURE__*/React.createElement(_Tooltip, {
10212
- title: "\u67E5\u770B",
10213
- key: "view"
10214
- }, /*#__PURE__*/React.createElement("a", {
10215
- onClick: function onClick() {
10216
- return openFormModel({
10217
- type: '查看',
10218
- record: record,
10219
- modalOnOk: function () {
10220
- var _modalOnOk2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
10221
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
10222
- while (1) {
10223
- switch (_context2.prev = _context2.next) {
10224
- case 0:
10225
- case "end":
10226
- return _context2.stop();
10227
- }
10228
- }
10229
- }, _callee2);
10230
- }));
10243
+ loading();
10244
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : _actionRef$current.reload();
10245
+ }, record);
10231
10246
 
10232
- function modalOnOk() {
10233
- return _modalOnOk2.apply(this, arguments);
10247
+ case 3:
10248
+ case "end":
10249
+ return _context2.stop();
10234
10250
  }
10251
+ }
10252
+ }, _callee2);
10253
+ }));
10235
10254
 
10236
- return modalOnOk;
10237
- }(),
10238
- index: index
10239
- });
10240
- },
10241
- key: "view"
10242
- }, /*#__PURE__*/React.createElement(EyeOutlined, null), " \u67E5\u770B"));
10243
- } else if (item.type === 'delete') {
10244
- return /*#__PURE__*/React.createElement(_Tooltip, {
10245
- title: "\u5220\u9664",
10246
- key: "delete"
10247
- }, /*#__PURE__*/React.createElement("a", {
10248
- onClick: function onClick() {
10249
- return _Modal.confirm({
10250
- title: '删除',
10251
- icon: /*#__PURE__*/React.createElement(ExclamationCircleOutlined, null),
10252
- content: '是否确定要删除吗?',
10253
- okText: '确认',
10254
- cancelText: '取消',
10255
- onOk: function () {
10256
- var _onOk = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
10257
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
10258
- while (1) {
10259
- switch (_context3.prev = _context3.next) {
10260
- case 0:
10261
- if (!item.actionMethod) {
10262
- _context3.next = 3;
10263
- break;
10264
- }
10255
+ function modalOnOk(_x, _x2) {
10256
+ return _modalOnOk2.apply(this, arguments);
10257
+ }
10265
10258
 
10266
- _context3.next = 3;
10267
- return item.actionMethod(record, function () {
10268
- var _actionRef$current2;
10259
+ return modalOnOk;
10260
+ }(),
10261
+ index: index
10262
+ });
10263
+ },
10264
+ delete: function _delete(item, record, index) {
10265
+ _Modal.confirm({
10266
+ title: '删除',
10267
+ icon: /*#__PURE__*/React.createElement(ExclamationCircleOutlined, null),
10268
+ content: '是否确定要删除吗?',
10269
+ okText: '确认',
10270
+ cancelText: '取消',
10271
+ onOk: function () {
10272
+ var _onOk = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
10273
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
10274
+ while (1) {
10275
+ switch (_context3.prev = _context3.next) {
10276
+ case 0:
10277
+ if (!item.actionMethod) {
10278
+ _context3.next = 3;
10279
+ break;
10280
+ }
10269
10281
 
10270
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : _actionRef$current2.reload();
10271
- });
10282
+ _context3.next = 3;
10283
+ return item.actionMethod(record, function () {
10284
+ var _actionRef$current2;
10272
10285
 
10273
- case 3:
10274
- case "end":
10275
- return _context3.stop();
10276
- }
10277
- }
10278
- }, _callee3);
10279
- }));
10286
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : _actionRef$current2.reload();
10287
+ });
10280
10288
 
10281
- function onOk() {
10282
- return _onOk.apply(this, arguments);
10289
+ case 3:
10290
+ case "end":
10291
+ return _context3.stop();
10283
10292
  }
10293
+ }
10294
+ }, _callee3);
10295
+ }));
10284
10296
 
10285
- return onOk;
10286
- }()
10287
- });
10288
- },
10289
- key: "del"
10290
- }, /*#__PURE__*/React.createElement(DeleteOutlined, null), " \u5220\u9664"));
10291
- } else if (item.type === 'extraAction') {
10292
- var _item$actionRender;
10293
-
10294
- return (_item$actionRender = item.actionRender) === null || _item$actionRender === void 0 ? void 0 : _item$actionRender.call(item, record, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
10295
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
10296
- while (1) {
10297
- switch (_context4.prev = _context4.next) {
10298
- case 0:
10299
- if (!item.actionMethod) {
10300
- _context4.next = 3;
10301
- break;
10302
- }
10297
+ function onOk() {
10298
+ return _onOk.apply(this, arguments);
10299
+ }
10303
10300
 
10301
+ return onOk;
10302
+ }()
10303
+ });
10304
+ },
10305
+ extraAction: function extraAction(item, record, index) {
10306
+ var _item$actionRender;
10307
+
10308
+ return (_item$actionRender = item.actionRender) === null || _item$actionRender === void 0 ? void 0 : _item$actionRender.call(item, record, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
10309
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
10310
+ while (1) {
10311
+ switch (_context4.prev = _context4.next) {
10312
+ case 0:
10313
+ if (!item.actionMethod) {
10304
10314
  _context4.next = 3;
10305
- return item.actionMethod(record, function () {
10306
- var _actionRef$current3;
10315
+ break;
10316
+ }
10307
10317
 
10308
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : _actionRef$current3.reload();
10309
- });
10318
+ _context4.next = 3;
10319
+ return item.actionMethod(record, function () {
10320
+ var _actionRef$current3;
10310
10321
 
10311
- case 3:
10312
- case "end":
10313
- return _context4.stop();
10314
- }
10322
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : _actionRef$current3.reload();
10323
+ });
10324
+
10325
+ case 3:
10326
+ case "end":
10327
+ return _context4.stop();
10315
10328
  }
10316
- }, _callee4);
10317
- })), index);
10329
+ }
10330
+ }, _callee4);
10331
+ })), index);
10332
+ },
10333
+ more: function more(item, record, index) {
10334
+ var menus = !item.subMenus ? [] : item.subMenus.map(function (b) {
10335
+ var btn = actionConfig[b.key];
10336
+
10337
+ if (btn) {
10338
+ b.name = btn.title;
10339
+ b.icon = btn.icon;
10340
+ }
10341
+
10342
+ return b;
10343
+ });
10344
+
10345
+ var selectHandler = function selectHandler(key, item, record, index) {
10346
+ var _item$actionMethod;
10347
+
10348
+ if (key == 'more') {
10349
+ // No more recursion
10350
+ return;
10351
+ }
10352
+
10353
+ var customMenu = menus.find(function (m) {
10354
+ return m.key === key;
10355
+ });
10356
+
10357
+ var _item = _objectSpread2(_objectSpread2({}, customMenu), {}, {
10358
+ type: key
10359
+ });
10360
+
10361
+ var handler = actionHandler[key];
10362
+
10363
+ if (handler) {
10364
+ return handler(_item, record, index);
10365
+ }
10366
+
10367
+ return (_item$actionMethod = _item.actionMethod) === null || _item$actionMethod === void 0 ? void 0 : _item$actionMethod.call(_item, record, function () {
10368
+ var _actionRef$current4;
10369
+
10370
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : _actionRef$current4.reload();
10371
+ });
10372
+ };
10373
+
10374
+ var m = _toConsumableArray(menus).map(function (e) {
10375
+ if (!('actionMethod' in e)) {
10376
+ return e;
10377
+ }
10378
+
10379
+ var actionMethod = e.actionMethod,
10380
+ b = _objectWithoutProperties(e, _excluded2$3);
10381
+
10382
+ return _objectSpread2({}, b);
10383
+ });
10384
+
10385
+ return /*#__PURE__*/React.createElement(TableDropdown, {
10386
+ key: "actionGroup",
10387
+ children: /*#__PURE__*/React.createElement(MoreOutlined, null),
10388
+ menus: m,
10389
+ onSelect: function onSelect(key) {
10390
+ return selectHandler(key, item, record, index);
10391
+ }
10392
+ });
10393
+ }
10394
+ };
10395
+ var actionConfig = {
10396
+ view: {
10397
+ title: '查看',
10398
+ key: 'view',
10399
+ icon: /*#__PURE__*/React.createElement(EyeOutlined, null)
10400
+ },
10401
+ edit: {
10402
+ title: '编辑',
10403
+ key: 'edit',
10404
+ icon: /*#__PURE__*/React.createElement(EditOutlined, null)
10405
+ },
10406
+ delete: {
10407
+ title: '删除',
10408
+ key: 'delete',
10409
+ icon: /*#__PURE__*/React.createElement(DeleteOutlined, null)
10410
+ }
10411
+ };
10412
+
10413
+ var tableActionDom = function tableActionDom(record, index) {
10414
+ return tableAction === null || tableAction === void 0 ? void 0 : tableAction.map(function (item) {
10415
+ var _actionHandler$item$t2;
10416
+
10417
+ var btn = actionConfig[item.type];
10418
+
10419
+ if (btn) {
10420
+ return /*#__PURE__*/React.createElement(_Tooltip, {
10421
+ title: btn.title,
10422
+ key: btn.key
10423
+ }, /*#__PURE__*/React.createElement("a", {
10424
+ key: btn.key,
10425
+ onClick: function onClick() {
10426
+ var _actionHandler$item$t;
10427
+
10428
+ return (_actionHandler$item$t = actionHandler[item.type]) === null || _actionHandler$item$t === void 0 ? void 0 : _actionHandler$item$t.call(actionHandler, item, record, index);
10429
+ }
10430
+ }, btn.icon, " ", btn.title));
10318
10431
  }
10432
+
10433
+ return (_actionHandler$item$t2 = actionHandler[item.type]) === null || _actionHandler$item$t2 === void 0 ? void 0 : _actionHandler$item$t2.call(actionHandler, item, record, index);
10319
10434
  });
10320
10435
  };
10321
10436
 
@@ -10345,10 +10460,10 @@ var TabelCard = function TabelCard(props, ref) {
10345
10460
 
10346
10461
  _context5.next = 3;
10347
10462
  return item.actionMethod(values, function () {
10348
- var _actionRef$current4;
10463
+ var _actionRef$current5;
10349
10464
 
10350
10465
  loading();
10351
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : _actionRef$current4.reload();
10466
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : _actionRef$current5.reload();
10352
10467
  });
10353
10468
 
10354
10469
  case 3:
@@ -10373,9 +10488,9 @@ var TabelCard = function TabelCard(props, ref) {
10373
10488
 
10374
10489
  return (_item$actionRender2 = item.actionRender) === null || _item$actionRender2 === void 0 ? void 0 : _item$actionRender2.call(item, actionRef, function () {
10375
10490
  item.actionMethod && item.actionMethod(actionRef, function () {
10376
- var _actionRef$current5;
10491
+ var _actionRef$current6;
10377
10492
 
10378
- return actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : _actionRef$current5.reload();
10493
+ return actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : _actionRef$current6.reload();
10379
10494
  });
10380
10495
  });
10381
10496
  }
@@ -10421,7 +10536,19 @@ var TabelCard = function TabelCard(props, ref) {
10421
10536
  onFormChange: onFormChange,
10422
10537
  extraColumns: extraColumns || [],
10423
10538
  columns: (columns || []).filter(function (item) {
10424
- return !item.hiddenInModalForm;
10539
+ if (item.hiddenInModalForm) {
10540
+ return false;
10541
+ }
10542
+
10543
+ if (item.onlyShowInView) {
10544
+ if (modalFormConfig.type === '查看') {
10545
+ return true;
10546
+ } else {
10547
+ return false;
10548
+ }
10549
+ }
10550
+
10551
+ return true;
10425
10552
  })
10426
10553
  })), /*#__PURE__*/React.createElement(ProTable, _objectSpread2({
10427
10554
  actionRef: actionRef,
@@ -10438,7 +10565,23 @@ var TabelCard = function TabelCard(props, ref) {
10438
10565
  render: function render(_, record, index) {
10439
10566
  return tableActionDom(record, index);
10440
10567
  }
10441
- }, optionColumnConfig)]) : columns || [],
10568
+ }, optionColumnConfig)]).map(function (item) {
10569
+ var obj = _objectSpread2({}, item);
10570
+
10571
+ if (item.notInitialValueInSearch) {
10572
+ delete obj.initialValue;
10573
+ }
10574
+
10575
+ return obj;
10576
+ }) : (columns || []).map(function (item) {
10577
+ var obj = _objectSpread2({}, item);
10578
+
10579
+ if (item.notInitialValueInSearch) {
10580
+ delete obj.initialValue;
10581
+ }
10582
+
10583
+ return obj;
10584
+ }),
10442
10585
  search: {
10443
10586
  labelWidth: 'auto',
10444
10587
  optionRender: function optionRender(searchConfig, formProps, dom) {