wargerm 0.2.17 → 0.2.21

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/README.zh-CN.md CHANGED
@@ -1,40 +1,40 @@
1
- <!--
2
- * @Author: lijin
3
- * @Date: 2021-10-18 15:22:28
4
- * @LastEditTime: 2021-11-05 09:25:52
5
- * @LastEditors: lijin
6
- * @Description:
7
- * @FilePath: \wargerm\README.zh-CN.md
8
- * 可以输入预定的版权声明、个性签名、空行等
9
- -->
10
-
11
- ## 📒 目录介绍
12
-
13
- ```
14
- ├── docs 文档存放路径
15
- │ ├── index.md 首页展示
16
- │ └── **.** 网站目录文档
17
- ├── src 组件主目录
18
- │ ├── index.ts 组件注册
19
- │ └── Foo 组件开发
20
- ├── .eslintrc.js eslint 配置
21
- ├── .fatherrc.ts father 配置
22
- ├── .umirc.ts dumi 配置
23
- └── tsconfig.json typescript 配置
24
- ```
25
-
26
- 其余文件可自行查阅了解。
27
-
28
- ## 🤖 命令介绍
29
-
30
- | 名称 | 描述 | 备注 |
31
- | ----------------------- | -------------- | ----------------------------- |
32
- | `npm run dev` | 项目启动 | - |
33
- | `npm run test` | 组件测试 | - |
34
- | `npm run test:coverage` | 代码覆盖率查看 | - |
35
- | `npm run prettier` | 代码美化 | - |
36
- | `npm run build` | 组件打包 | - |
37
- | `npm run release` | 组件打包发布 | - |
38
- | `npm run docs:build` | 文档打包 | - |
39
- | `npm run docs:deploy` | 文档发布 | 这里默认是使用了 GitHub Pages |
40
- | `npm run deploy` | 文档打包发布 | - |
1
+ <!--
2
+ * @Author: lijin
3
+ * @Date: 2021-10-18 15:22:28
4
+ * @LastEditTime: 2021-11-05 09:25:52
5
+ * @LastEditors: lijin
6
+ * @Description:
7
+ * @FilePath: \wargerm\README.zh-CN.md
8
+ * 可以输入预定的版权声明、个性签名、空行等
9
+ -->
10
+
11
+ ## 📒 目录介绍
12
+
13
+ ```
14
+ ├── docs 文档存放路径
15
+ │ ├── index.md 首页展示
16
+ │ └── **.** 网站目录文档
17
+ ├── src 组件主目录
18
+ │ ├── index.ts 组件注册
19
+ │ └── Foo 组件开发
20
+ ├── .eslintrc.js eslint 配置
21
+ ├── .fatherrc.ts father 配置
22
+ ├── .umirc.ts dumi 配置
23
+ └── tsconfig.json typescript 配置
24
+ ```
25
+
26
+ 其余文件可自行查阅了解。
27
+
28
+ ## 🤖 命令介绍
29
+
30
+ | 名称 | 描述 | 备注 |
31
+ | ----------------------- | -------------- | ----------------------------- |
32
+ | `npm run dev` | 项目启动 | - |
33
+ | `npm run test` | 组件测试 | - |
34
+ | `npm run test:coverage` | 代码覆盖率查看 | - |
35
+ | `npm run prettier` | 代码美化 | - |
36
+ | `npm run build` | 组件打包 | - |
37
+ | `npm run release` | 组件打包发布 | - |
38
+ | `npm run docs:build` | 文档打包 | - |
39
+ | `npm run docs:deploy` | 文档发布 | 这里默认是使用了 GitHub Pages |
40
+ | `npm run deploy` | 文档打包发布 | - |
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);
@@ -529,41 +529,39 @@ var WSelect = function WSelect(props) {
529
529
  setResList = _useState6[1];
530
530
 
531
531
  useEffect(function () {
532
- if (!resList) {
533
- _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
534
- var res, node;
535
- return regeneratorRuntime.wrap(function _callee$(_context) {
536
- while (1) {
537
- switch (_context.prev = _context.next) {
538
- case 0:
539
- if (!request) {
540
- _context.next = 8;
541
- break;
542
- }
532
+ _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
533
+ var res, node;
534
+ return regeneratorRuntime.wrap(function _callee$(_context) {
535
+ while (1) {
536
+ switch (_context.prev = _context.next) {
537
+ case 0:
538
+ if (!request) {
539
+ _context.next = 8;
540
+ break;
541
+ }
543
542
 
544
- _context.next = 3;
545
- return request();
543
+ _context.next = 3;
544
+ return request();
546
545
 
547
- case 3:
548
- res = _context.sent;
549
- setResList(res);
550
- onLoad && onLoad(res);
551
- node = res.map(function (item) {
552
- return /*#__PURE__*/React.createElement(_Select.Option, {
553
- key: item.value,
554
- value: item.value
555
- }, item.label);
556
- });
557
- setChildrenNode(node);
546
+ case 3:
547
+ res = _context.sent;
548
+ setResList(res);
549
+ onLoad && onLoad(res);
550
+ node = res.map(function (item) {
551
+ return /*#__PURE__*/React.createElement(_Select.Option, {
552
+ key: item.value,
553
+ value: item.value
554
+ }, item.label);
555
+ });
556
+ setChildrenNode(node);
558
557
 
559
- case 8:
560
- case "end":
561
- return _context.stop();
562
- }
558
+ case 8:
559
+ case "end":
560
+ return _context.stop();
563
561
  }
564
- }, _callee);
565
- }))();
566
- }
562
+ }
563
+ }, _callee);
564
+ }))();
567
565
 
568
566
  var valueEnumNode = [];
569
567
  var options = [];
@@ -593,7 +591,7 @@ var WSelect = function WSelect(props) {
593
591
 
594
592
  onLoad && onLoad(options);
595
593
  setValueEnumList(valueEnumNode);
596
- }, [resList]);
594
+ }, [JSON.stringify(resList)]);
597
595
  return /*#__PURE__*/React.createElement(_Select, _objectSpread2({}, extraProps), request ? childrenNode : valueEnum ? valueEnumList : children);
598
596
  };
599
597
 
@@ -9201,7 +9199,9 @@ function invariant(condition, message) {
9201
9199
  if (isProduction$1) {
9202
9200
  throw new Error(prefix);
9203
9201
  }
9204
- throw new Error(prefix + ": " + (message || ''));
9202
+ var provided = typeof message === 'function' ? message() : message;
9203
+ var value = provided ? prefix + ": " + provided : prefix;
9204
+ throw new Error(value);
9205
9205
  }
9206
9206
 
9207
9207
  function addLeadingSlash(path) {
@@ -10119,7 +10119,8 @@ var ModalForm = function ModalForm(props, ref) {
10119
10119
 
10120
10120
  var ModalForm$1 = /*#__PURE__*/React.forwardRef(ModalForm);
10121
10121
 
10122
- var _excluded$f = ["columns", "extraColumns", "request", "modalFormSearch", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig"];
10122
+ var _excluded$f = ["columns", "extraColumns", "request", "modalFormSearch", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig"],
10123
+ _excluded2$3 = ["actionMethod"];
10123
10124
 
10124
10125
  var TabelCard = function TabelCard(props, ref) {
10125
10126
  var columns = props.columns,
@@ -10160,164 +10161,243 @@ var TabelCard = function TabelCard(props, ref) {
10160
10161
  setModalFormConfig(options);
10161
10162
  };
10162
10163
 
10163
- var tableActionDom = function tableActionDom(record, index) {
10164
- return tableAction === null || tableAction === void 0 ? void 0 : tableAction.map(function (item) {
10165
- if (item.type === 'edit') {
10166
- return /*#__PURE__*/React.createElement(_Tooltip, {
10167
- title: "\u7F16\u8F91",
10168
- key: "edit"
10169
- }, /*#__PURE__*/React.createElement("a", {
10170
- key: "editable",
10171
- onClick: function onClick() {
10172
- return openFormModel({
10173
- type: '编辑',
10174
- record: record,
10175
- modalOnOk: function () {
10176
- var _modalOnOk = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(values, loading) {
10177
- return regeneratorRuntime.wrap(function _callee$(_context) {
10178
- while (1) {
10179
- switch (_context.prev = _context.next) {
10180
- case 0:
10181
- if (!item.actionMethod) {
10182
- _context.next = 3;
10183
- break;
10184
- }
10185
-
10186
- _context.next = 3;
10187
- return item.actionMethod(values, function () {
10188
- var _actionRef$current;
10164
+ var actionHandler = {
10165
+ view: function view(item, record, index) {
10166
+ openFormModel({
10167
+ type: '查看',
10168
+ record: record,
10169
+ modalOnOk: function () {
10170
+ var _modalOnOk = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
10171
+ return regeneratorRuntime.wrap(function _callee$(_context) {
10172
+ while (1) {
10173
+ switch (_context.prev = _context.next) {
10174
+ case 0:
10175
+ case "end":
10176
+ return _context.stop();
10177
+ }
10178
+ }
10179
+ }, _callee);
10180
+ }));
10189
10181
 
10190
- loading();
10191
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : _actionRef$current.reload();
10192
- }, record);
10182
+ function modalOnOk() {
10183
+ return _modalOnOk.apply(this, arguments);
10184
+ }
10193
10185
 
10194
- case 3:
10195
- case "end":
10196
- return _context.stop();
10197
- }
10186
+ return modalOnOk;
10187
+ }(),
10188
+ index: index
10189
+ });
10190
+ },
10191
+ edit: function edit(item, record, index) {
10192
+ openFormModel({
10193
+ type: '编辑',
10194
+ record: record,
10195
+ modalOnOk: function () {
10196
+ var _modalOnOk2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(values, loading) {
10197
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
10198
+ while (1) {
10199
+ switch (_context2.prev = _context2.next) {
10200
+ case 0:
10201
+ if (!item.actionMethod) {
10202
+ _context2.next = 3;
10203
+ break;
10198
10204
  }
10199
- }, _callee);
10200
- }));
10201
10205
 
10202
- function modalOnOk(_x, _x2) {
10203
- return _modalOnOk.apply(this, arguments);
10204
- }
10206
+ _context2.next = 3;
10207
+ return item.actionMethod(values, function () {
10208
+ var _actionRef$current;
10205
10209
 
10206
- return modalOnOk;
10207
- }(),
10208
- index: index
10209
- });
10210
- }
10211
- }, /*#__PURE__*/React.createElement(EditOutlined, null), " \u7F16\u8F91"));
10212
- } else if (item.type === 'view') {
10213
- return /*#__PURE__*/React.createElement(_Tooltip, {
10214
- title: "\u67E5\u770B",
10215
- key: "view"
10216
- }, /*#__PURE__*/React.createElement("a", {
10217
- onClick: function onClick() {
10218
- return openFormModel({
10219
- type: '查看',
10220
- record: record,
10221
- modalOnOk: function () {
10222
- var _modalOnOk2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
10223
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
10224
- while (1) {
10225
- switch (_context2.prev = _context2.next) {
10226
- case 0:
10227
- case "end":
10228
- return _context2.stop();
10229
- }
10230
- }
10231
- }, _callee2);
10232
- }));
10210
+ loading();
10211
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : _actionRef$current.reload();
10212
+ }, record);
10233
10213
 
10234
- function modalOnOk() {
10235
- return _modalOnOk2.apply(this, arguments);
10214
+ case 3:
10215
+ case "end":
10216
+ return _context2.stop();
10236
10217
  }
10218
+ }
10219
+ }, _callee2);
10220
+ }));
10237
10221
 
10238
- return modalOnOk;
10239
- }(),
10240
- index: index
10241
- });
10242
- },
10243
- key: "view"
10244
- }, /*#__PURE__*/React.createElement(EyeOutlined, null), " \u67E5\u770B"));
10245
- } else if (item.type === 'delete') {
10246
- return /*#__PURE__*/React.createElement(_Tooltip, {
10247
- title: "\u5220\u9664",
10248
- key: "delete"
10249
- }, /*#__PURE__*/React.createElement("a", {
10250
- onClick: function onClick() {
10251
- return _Modal.confirm({
10252
- title: '删除',
10253
- icon: /*#__PURE__*/React.createElement(ExclamationCircleOutlined, null),
10254
- content: '是否确定要删除吗?',
10255
- okText: '确认',
10256
- cancelText: '取消',
10257
- onOk: function () {
10258
- var _onOk = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
10259
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
10260
- while (1) {
10261
- switch (_context3.prev = _context3.next) {
10262
- case 0:
10263
- if (!item.actionMethod) {
10264
- _context3.next = 3;
10265
- break;
10266
- }
10222
+ function modalOnOk(_x, _x2) {
10223
+ return _modalOnOk2.apply(this, arguments);
10224
+ }
10267
10225
 
10268
- _context3.next = 3;
10269
- return item.actionMethod(record, function () {
10270
- var _actionRef$current2;
10226
+ return modalOnOk;
10227
+ }(),
10228
+ index: index
10229
+ });
10230
+ },
10231
+ delete: function _delete(item, record, index) {
10232
+ _Modal.confirm({
10233
+ title: '删除',
10234
+ icon: /*#__PURE__*/React.createElement(ExclamationCircleOutlined, null),
10235
+ content: '是否确定要删除吗?',
10236
+ okText: '确认',
10237
+ cancelText: '取消',
10238
+ onOk: function () {
10239
+ var _onOk = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
10240
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
10241
+ while (1) {
10242
+ switch (_context3.prev = _context3.next) {
10243
+ case 0:
10244
+ if (!item.actionMethod) {
10245
+ _context3.next = 3;
10246
+ break;
10247
+ }
10271
10248
 
10272
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : _actionRef$current2.reload();
10273
- });
10249
+ _context3.next = 3;
10250
+ return item.actionMethod(record, function () {
10251
+ var _actionRef$current2;
10274
10252
 
10275
- case 3:
10276
- case "end":
10277
- return _context3.stop();
10278
- }
10279
- }
10280
- }, _callee3);
10281
- }));
10253
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : _actionRef$current2.reload();
10254
+ });
10282
10255
 
10283
- function onOk() {
10284
- return _onOk.apply(this, arguments);
10256
+ case 3:
10257
+ case "end":
10258
+ return _context3.stop();
10285
10259
  }
10260
+ }
10261
+ }, _callee3);
10262
+ }));
10286
10263
 
10287
- return onOk;
10288
- }()
10289
- });
10290
- },
10291
- key: "del"
10292
- }, /*#__PURE__*/React.createElement(DeleteOutlined, null), " \u5220\u9664"));
10293
- } else if (item.type === 'extraAction') {
10294
- var _item$actionRender;
10295
-
10296
- return (_item$actionRender = item.actionRender) === null || _item$actionRender === void 0 ? void 0 : _item$actionRender.call(item, record, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
10297
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
10298
- while (1) {
10299
- switch (_context4.prev = _context4.next) {
10300
- case 0:
10301
- if (!item.actionMethod) {
10302
- _context4.next = 3;
10303
- break;
10304
- }
10264
+ function onOk() {
10265
+ return _onOk.apply(this, arguments);
10266
+ }
10267
+
10268
+ return onOk;
10269
+ }()
10270
+ });
10271
+ },
10272
+ extraAction: function extraAction(item, record, index) {
10273
+ var _item$actionRender;
10305
10274
 
10275
+ return (_item$actionRender = item.actionRender) === null || _item$actionRender === void 0 ? void 0 : _item$actionRender.call(item, record, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
10276
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
10277
+ while (1) {
10278
+ switch (_context4.prev = _context4.next) {
10279
+ case 0:
10280
+ if (!item.actionMethod) {
10306
10281
  _context4.next = 3;
10307
- return item.actionMethod(record, function () {
10308
- var _actionRef$current3;
10282
+ break;
10283
+ }
10309
10284
 
10310
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : _actionRef$current3.reload();
10311
- });
10285
+ _context4.next = 3;
10286
+ return item.actionMethod(record, function () {
10287
+ var _actionRef$current3;
10312
10288
 
10313
- case 3:
10314
- case "end":
10315
- return _context4.stop();
10316
- }
10289
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : _actionRef$current3.reload();
10290
+ });
10291
+
10292
+ case 3:
10293
+ case "end":
10294
+ return _context4.stop();
10317
10295
  }
10318
- }, _callee4);
10319
- })), index);
10296
+ }
10297
+ }, _callee4);
10298
+ })), index);
10299
+ },
10300
+ more: function more(item, record, index) {
10301
+ var menus = !item.subMenus ? [] : item.subMenus.map(function (b) {
10302
+ var btn = actionConfig[b.key];
10303
+
10304
+ if (btn) {
10305
+ b.name = btn.title;
10306
+ b.icon = btn.icon;
10307
+ }
10308
+
10309
+ return b;
10310
+ });
10311
+
10312
+ var selectHandler = function selectHandler(key, item, record, index) {
10313
+ var _item$actionMethod;
10314
+
10315
+ if (key == 'more') {
10316
+ // No more recursion
10317
+ return;
10318
+ }
10319
+
10320
+ var customMenu = menus.find(function (m) {
10321
+ return m.key === key;
10322
+ });
10323
+
10324
+ var _item = _objectSpread2(_objectSpread2({}, customMenu), {}, {
10325
+ type: key
10326
+ });
10327
+
10328
+ var handler = actionHandler[key];
10329
+
10330
+ if (handler) {
10331
+ return handler(_item, record, index);
10332
+ }
10333
+
10334
+ return (_item$actionMethod = _item.actionMethod) === null || _item$actionMethod === void 0 ? void 0 : _item$actionMethod.call(_item, record, function () {
10335
+ var _actionRef$current4;
10336
+
10337
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : _actionRef$current4.reload();
10338
+ });
10339
+ };
10340
+
10341
+ var m = _toConsumableArray(menus).map(function (e) {
10342
+ if (!('actionMethod' in e)) {
10343
+ return e;
10344
+ }
10345
+
10346
+ var actionMethod = e.actionMethod,
10347
+ b = _objectWithoutProperties(e, _excluded2$3);
10348
+
10349
+ return _objectSpread2({}, b);
10350
+ });
10351
+
10352
+ return /*#__PURE__*/React.createElement(TableDropdown, {
10353
+ key: "actionGroup",
10354
+ children: /*#__PURE__*/React.createElement(MoreOutlined, null),
10355
+ menus: m,
10356
+ onSelect: function onSelect(key) {
10357
+ return selectHandler(key, item, record, index);
10358
+ }
10359
+ });
10360
+ }
10361
+ };
10362
+ var actionConfig = {
10363
+ view: {
10364
+ title: '查看',
10365
+ key: 'view',
10366
+ icon: /*#__PURE__*/React.createElement(EyeOutlined, null)
10367
+ },
10368
+ edit: {
10369
+ title: '编辑',
10370
+ key: 'edit',
10371
+ icon: /*#__PURE__*/React.createElement(EditOutlined, null)
10372
+ },
10373
+ delete: {
10374
+ title: '删除',
10375
+ key: 'delete',
10376
+ icon: /*#__PURE__*/React.createElement(DeleteOutlined, null)
10377
+ }
10378
+ };
10379
+
10380
+ var tableActionDom = function tableActionDom(record, index) {
10381
+ return tableAction === null || tableAction === void 0 ? void 0 : tableAction.map(function (item) {
10382
+ var _actionHandler$item$t2;
10383
+
10384
+ var btn = actionConfig[item.type];
10385
+
10386
+ if (btn) {
10387
+ return /*#__PURE__*/React.createElement(_Tooltip, {
10388
+ title: btn.title,
10389
+ key: btn.key
10390
+ }, /*#__PURE__*/React.createElement("a", {
10391
+ key: btn.key,
10392
+ onClick: function onClick() {
10393
+ var _actionHandler$item$t;
10394
+
10395
+ return (_actionHandler$item$t = actionHandler[item.type]) === null || _actionHandler$item$t === void 0 ? void 0 : _actionHandler$item$t.call(actionHandler, item, record, index);
10396
+ }
10397
+ }, btn.icon, " ", btn.title));
10320
10398
  }
10399
+
10400
+ return (_actionHandler$item$t2 = actionHandler[item.type]) === null || _actionHandler$item$t2 === void 0 ? void 0 : _actionHandler$item$t2.call(actionHandler, item, record, index);
10321
10401
  });
10322
10402
  };
10323
10403
 
@@ -10347,10 +10427,10 @@ var TabelCard = function TabelCard(props, ref) {
10347
10427
 
10348
10428
  _context5.next = 3;
10349
10429
  return item.actionMethod(values, function () {
10350
- var _actionRef$current4;
10430
+ var _actionRef$current5;
10351
10431
 
10352
10432
  loading();
10353
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : _actionRef$current4.reload();
10433
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : _actionRef$current5.reload();
10354
10434
  });
10355
10435
 
10356
10436
  case 3:
@@ -10375,9 +10455,9 @@ var TabelCard = function TabelCard(props, ref) {
10375
10455
 
10376
10456
  return (_item$actionRender2 = item.actionRender) === null || _item$actionRender2 === void 0 ? void 0 : _item$actionRender2.call(item, actionRef, function () {
10377
10457
  item.actionMethod && item.actionMethod(actionRef, function () {
10378
- var _actionRef$current5;
10458
+ var _actionRef$current6;
10379
10459
 
10380
- return actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : _actionRef$current5.reload();
10460
+ return actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : _actionRef$current6.reload();
10381
10461
  });
10382
10462
  });
10383
10463
  }
@@ -10423,7 +10503,19 @@ var TabelCard = function TabelCard(props, ref) {
10423
10503
  onFormChange: onFormChange,
10424
10504
  extraColumns: extraColumns || [],
10425
10505
  columns: (columns || []).filter(function (item) {
10426
- return !item.hiddenInModalForm;
10506
+ if (item.hiddenInModalForm) {
10507
+ return false;
10508
+ }
10509
+
10510
+ if (item.onlyShowInView) {
10511
+ if (modalFormConfig.type === '查看') {
10512
+ return true;
10513
+ } else {
10514
+ return false;
10515
+ }
10516
+ }
10517
+
10518
+ return true;
10427
10519
  })
10428
10520
  })), /*#__PURE__*/React.createElement(ProTable, _objectSpread2({
10429
10521
  actionRef: actionRef,
@@ -10440,7 +10532,23 @@ var TabelCard = function TabelCard(props, ref) {
10440
10532
  render: function render(_, record, index) {
10441
10533
  return tableActionDom(record, index);
10442
10534
  }
10443
- }, optionColumnConfig)]) : columns || [],
10535
+ }, optionColumnConfig)]).map(function (item) {
10536
+ var obj = _objectSpread2({}, item);
10537
+
10538
+ if (item.notInitialValueInSearch) {
10539
+ delete obj.initialValue;
10540
+ }
10541
+
10542
+ return obj;
10543
+ }) : (columns || []).map(function (item) {
10544
+ var obj = _objectSpread2({}, item);
10545
+
10546
+ if (item.notInitialValueInSearch) {
10547
+ delete obj.initialValue;
10548
+ }
10549
+
10550
+ return obj;
10551
+ }),
10444
10552
  search: {
10445
10553
  labelWidth: 'auto',
10446
10554
  optionRender: function optionRender(searchConfig, formProps, dom) {