@zat-design/sisyphus-react 3.6.10-beta.2 → 3.6.10-beta.4

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.
Files changed (54) hide show
  1. package/dist/index.esm.css +11 -13
  2. package/dist/less.esm.css +11 -13
  3. package/es/ProEditTable/style/index.less +2 -1
  4. package/es/ProEditTable/utils/index.d.ts +1 -1
  5. package/es/ProEditTable/utils/index.js +19 -13
  6. package/es/ProEditTable/utils/tools.d.ts +6 -0
  7. package/es/ProEditTable/utils/tools.js +15 -2
  8. package/es/ProTable/style/index.less +27 -32
  9. package/lib/ProEditTable/style/index.less +2 -1
  10. package/lib/ProEditTable/utils/index.d.ts +1 -1
  11. package/lib/ProEditTable/utils/index.js +17 -11
  12. package/lib/ProEditTable/utils/tools.d.ts +6 -0
  13. package/lib/ProEditTable/utils/tools.js +15 -1
  14. package/lib/ProTable/style/index.less +27 -32
  15. package/package.json +1 -1
  16. package/coverage/lcov-report/src/.umi/core/devScripts.ts.html +0 -241
  17. package/coverage/lcov-report/src/.umi/core/history.ts.html +0 -148
  18. package/coverage/lcov-report/src/.umi/core/index.html +0 -206
  19. package/coverage/lcov-report/src/.umi/core/plugin.ts.html +0 -109
  20. package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +0 -160
  21. package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +0 -97
  22. package/coverage/lcov-report/src/.umi/core/routes.ts.html +0 -26050
  23. package/coverage/lcov-report/src/.umi/core/umiExports.ts.html +0 -112
  24. package/coverage/lcov-report/src/.umi/dumi/demos/index.html +0 -116
  25. package/coverage/lcov-report/src/.umi/dumi/demos/index.ts.html +0 -6340
  26. package/coverage/lcov-report/src/.umi/dumi/index.html +0 -116
  27. package/coverage/lcov-report/src/.umi/dumi/layout.tsx.html +0 -109
  28. package/coverage/lcov-report/src/.umi/index.html +0 -116
  29. package/coverage/lcov-report/src/.umi/plugin-antd/index.html +0 -116
  30. package/coverage/lcov-report/src/.umi/plugin-antd/runtime.tsx.html +0 -172
  31. package/coverage/lcov-report/src/.umi/plugin-helmet/exports.ts.html +0 -94
  32. package/coverage/lcov-report/src/.umi/plugin-helmet/index.html +0 -116
  33. package/coverage/lcov-report/src/.umi/plugin-initial-state/Provider.tsx.html +0 -196
  34. package/coverage/lcov-report/src/.umi/plugin-initial-state/exports.ts.html +0 -106
  35. package/coverage/lcov-report/src/.umi/plugin-initial-state/index.html +0 -146
  36. package/coverage/lcov-report/src/.umi/plugin-initial-state/models/index.html +0 -116
  37. package/coverage/lcov-report/src/.umi/plugin-initial-state/models/initialState.ts.html +0 -88
  38. package/coverage/lcov-report/src/.umi/plugin-initial-state/runtime.tsx.html +0 -124
  39. package/coverage/lcov-report/src/.umi/plugin-locale/SelectLang.tsx.html +0 -1246
  40. package/coverage/lcov-report/src/.umi/plugin-locale/index.html +0 -161
  41. package/coverage/lcov-report/src/.umi/plugin-locale/locale.tsx.html +0 -268
  42. package/coverage/lcov-report/src/.umi/plugin-locale/localeExports.ts.html +0 -778
  43. package/coverage/lcov-report/src/.umi/plugin-locale/runtime.tsx.html +0 -115
  44. package/coverage/lcov-report/src/.umi/plugin-model/Provider.tsx.html +0 -202
  45. package/coverage/lcov-report/src/.umi/plugin-model/helpers/constant.tsx.html +0 -97
  46. package/coverage/lcov-report/src/.umi/plugin-model/helpers/dispatcher.tsx.html +0 -142
  47. package/coverage/lcov-report/src/.umi/plugin-model/helpers/executor.tsx.html +0 -334
  48. package/coverage/lcov-report/src/.umi/plugin-model/helpers/index.html +0 -146
  49. package/coverage/lcov-report/src/.umi/plugin-model/index.html +0 -146
  50. package/coverage/lcov-report/src/.umi/plugin-model/runtime.tsx.html +0 -121
  51. package/coverage/lcov-report/src/.umi/plugin-model/useModel.tsx.html +0 -298
  52. package/coverage/lcov-report/src/.umi/plugin-request/index.html +0 -116
  53. package/coverage/lcov-report/src/.umi/plugin-request/request.ts.html +0 -919
  54. package/coverage/lcov-report/src/.umi/umi.ts.html +0 -268
@@ -1784,18 +1784,18 @@
1784
1784
  margin-right: 0;
1785
1785
  }
1786
1786
  .pro-table .ant-table-cell-with-append {
1787
- white-space: nowrap;
1788
1787
  position: relative;
1789
1788
  z-index: 100;
1789
+ white-space: nowrap;
1790
1790
  }
1791
1791
  .pro-table .ant-table-row-expand-icon {
1792
1792
  position: absolute;
1793
1793
  left: -16px;
1794
1794
  }
1795
1795
  .pro-table .ant-table-content > table .ant-table-summary {
1796
- background-color: var(--zaui-table-header-bg, #f2f3f5);
1797
1796
  color: var(--zaui-text, #343434);
1798
1797
  font-weight: 600;
1798
+ background-color: var(--zaui-table-header-bg, #f2f3f5);
1799
1799
  }
1800
1800
  .pro-table .ant-table-content > table .ant-table-summary .ant-table-cell-fix-left,
1801
1801
  .pro-table .ant-table-content > table .ant-table-summary .ant-table-cell-fix-right {
@@ -1807,26 +1807,26 @@
1807
1807
  .pro-table .ant-table-content > table td .pro-form-view-container_nowrap {
1808
1808
  white-space: normal;
1809
1809
  }
1810
- .pro-table .ant-table-content > table .ant-table-thead > tr > th:not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan]).is-required.is-required-right .pro-edit-table-title::before {
1810
+ .pro-table .ant-table-content > table .ant-table-thead > tr > th:not(.ant-table-selection-column):not( .ant-table-row-expand-icon-cell):not([colspan]).is-required.is-required-right .pro-edit-table-title::before {
1811
1811
  position: static;
1812
1812
  top: 0;
1813
1813
  display: inline-block;
1814
- text-indent: -8px;
1815
1814
  color: #ff5050;
1816
1815
  font-size: var(--zaui-font-size-md, 14px);
1817
1816
  line-height: 1;
1818
- content: "*";
1817
+ text-indent: -8px;
1818
+ content: '*';
1819
1819
  }
1820
- .pro-table .ant-table-content > table .ant-table-thead > tr > th:not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan]).is-required.is-required-left .pro-edit-table-title::after {
1821
- width: auto;
1820
+ .pro-table .ant-table-content > table .ant-table-thead > tr > th:not(.ant-table-selection-column):not( .ant-table-row-expand-icon-cell):not([colspan]).is-required.is-required-left .pro-edit-table-title::after {
1822
1821
  position: static;
1823
1822
  top: 0;
1824
1823
  display: inline-block;
1824
+ width: auto;
1825
1825
  margin-left: var(--zaui-space-size-xs, 4px);
1826
1826
  color: #ff5050;
1827
1827
  font-size: 14px;
1828
1828
  line-height: 1;
1829
- content: "*";
1829
+ content: '*';
1830
1830
  }
1831
1831
  .pro-table .drag-wrapper {
1832
1832
  display: -webkit-box;
@@ -1836,8 +1836,8 @@
1836
1836
  width: 20px;
1837
1837
  }
1838
1838
  .pro-table .drag-wrapper .anticon {
1839
- cursor: pointer;
1840
1839
  margin-right: 12px;
1840
+ cursor: pointer;
1841
1841
  }
1842
1842
  .pro-table .drag-wrapper .anticon .drag-icon {
1843
1843
  margin-right: 0;
@@ -2147,9 +2147,6 @@
2147
2147
  .ant-dropdown-placement-bottomLeft .ant-dropdown-menu-vertical.ant-dropdown-menu-light .ant-dropdown-menu-item-only-child:hover {
2148
2148
  background: rgba(0, 106, 255, 0.08);
2149
2149
  }
2150
- .pro-edit-table-drag table tr th.ant-table-selection-column.ant-table-cell-fix-left {
2151
- text-align: right;
2152
- }
2153
2150
  .pro-tooltip {
2154
2151
  cursor: pointer;
2155
2152
  }
@@ -4526,7 +4523,8 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
4526
4523
  margin-left: var(--zaui-space-size-xs, 4px);
4527
4524
  }
4528
4525
  .pro-edit-table-drag table tr th.ant-table-selection-column.ant-table-cell-fix-left {
4529
- text-align: right;
4526
+ text-align: left;
4527
+ padding-left: 52px;
4530
4528
  }
4531
4529
  .pro-edit-label {
4532
4530
  display: inline-block;
package/dist/less.esm.css CHANGED
@@ -1784,18 +1784,18 @@
1784
1784
  margin-right: 0;
1785
1785
  }
1786
1786
  .pro-table .ant-table-cell-with-append {
1787
- white-space: nowrap;
1788
1787
  position: relative;
1789
1788
  z-index: 100;
1789
+ white-space: nowrap;
1790
1790
  }
1791
1791
  .pro-table .ant-table-row-expand-icon {
1792
1792
  position: absolute;
1793
1793
  left: -16px;
1794
1794
  }
1795
1795
  .pro-table .ant-table-content > table .ant-table-summary {
1796
- background-color: var(--zaui-table-header-bg, #f2f3f5);
1797
1796
  color: var(--zaui-text, #343434);
1798
1797
  font-weight: 600;
1798
+ background-color: var(--zaui-table-header-bg, #f2f3f5);
1799
1799
  }
1800
1800
  .pro-table .ant-table-content > table .ant-table-summary .ant-table-cell-fix-left,
1801
1801
  .pro-table .ant-table-content > table .ant-table-summary .ant-table-cell-fix-right {
@@ -1807,26 +1807,26 @@
1807
1807
  .pro-table .ant-table-content > table td .pro-form-view-container_nowrap {
1808
1808
  white-space: normal;
1809
1809
  }
1810
- .pro-table .ant-table-content > table .ant-table-thead > tr > th:not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan]).is-required.is-required-right .pro-edit-table-title::before {
1810
+ .pro-table .ant-table-content > table .ant-table-thead > tr > th:not(.ant-table-selection-column):not( .ant-table-row-expand-icon-cell):not([colspan]).is-required.is-required-right .pro-edit-table-title::before {
1811
1811
  position: static;
1812
1812
  top: 0;
1813
1813
  display: inline-block;
1814
- text-indent: -8px;
1815
1814
  color: #ff5050;
1816
1815
  font-size: var(--zaui-font-size-md, 14px);
1817
1816
  line-height: 1;
1818
- content: "*";
1817
+ text-indent: -8px;
1818
+ content: '*';
1819
1819
  }
1820
- .pro-table .ant-table-content > table .ant-table-thead > tr > th:not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan]).is-required.is-required-left .pro-edit-table-title::after {
1821
- width: auto;
1820
+ .pro-table .ant-table-content > table .ant-table-thead > tr > th:not(.ant-table-selection-column):not( .ant-table-row-expand-icon-cell):not([colspan]).is-required.is-required-left .pro-edit-table-title::after {
1822
1821
  position: static;
1823
1822
  top: 0;
1824
1823
  display: inline-block;
1824
+ width: auto;
1825
1825
  margin-left: var(--zaui-space-size-xs, 4px);
1826
1826
  color: #ff5050;
1827
1827
  font-size: 14px;
1828
1828
  line-height: 1;
1829
- content: "*";
1829
+ content: '*';
1830
1830
  }
1831
1831
  .pro-table .drag-wrapper {
1832
1832
  display: -webkit-box;
@@ -1836,8 +1836,8 @@
1836
1836
  width: 20px;
1837
1837
  }
1838
1838
  .pro-table .drag-wrapper .anticon {
1839
- cursor: pointer;
1840
1839
  margin-right: 12px;
1840
+ cursor: pointer;
1841
1841
  }
1842
1842
  .pro-table .drag-wrapper .anticon .drag-icon {
1843
1843
  margin-right: 0;
@@ -2147,9 +2147,6 @@
2147
2147
  .ant-dropdown-placement-bottomLeft .ant-dropdown-menu-vertical.ant-dropdown-menu-light .ant-dropdown-menu-item-only-child:hover {
2148
2148
  background: rgba(0, 106, 255, 0.08);
2149
2149
  }
2150
- .pro-edit-table-drag table tr th.ant-table-selection-column.ant-table-cell-fix-left {
2151
- text-align: right;
2152
- }
2153
2150
  .pro-tooltip {
2154
2151
  cursor: pointer;
2155
2152
  }
@@ -4526,7 +4523,8 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
4526
4523
  margin-left: var(--zaui-space-size-xs, 4px);
4527
4524
  }
4528
4525
  .pro-edit-table-drag table tr th.ant-table-selection-column.ant-table-cell-fix-left {
4529
- text-align: right;
4526
+ text-align: left;
4527
+ padding-left: 52px;
4530
4528
  }
4531
4529
  .pro-edit-label {
4532
4530
  display: inline-block;
@@ -327,6 +327,7 @@
327
327
 
328
328
  .pro-edit-table-drag {
329
329
  table tr th.@{ant-prefix}-table-selection-column.@{ant-prefix}-table-cell-fix-left{
330
- text-align: right;
330
+ text-align: left;
331
+ padding-left: 52px;
331
332
  }
332
333
  }
@@ -6,4 +6,4 @@
6
6
  * @param columns 表格配置数据
7
7
  * @param config
8
8
  */
9
- export declare const transformColumns: (columns: any[], config: any) => any[];
9
+ export declare const transformColumns: (columns: any[], config: any) => any;
@@ -13,28 +13,33 @@ var _excluded = ["type", "label", "show", "needConfirm", "onHandle", "onClick"],
13
13
  _excluded2 = ["title", "icon"];
14
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
15
  import React from 'react';
16
- import { cloneDeep, isArray, isBoolean, isEqual } from 'lodash';
16
+ import { cloneDeep, cloneDeepWith, isArray, isBoolean, isEqual } from 'lodash';
17
17
  import classnames from 'classnames';
18
18
  import { ReactSVG } from 'react-svg';
19
19
  import { tools } from '@zat-design/utils';
20
20
  import { actions, defaultBtnNameMap, defaultSingleActionKeys, defaultMultipleActionKeys, defaultEditingActionKeys } from './config';
21
- import { customValidate, getNamePath, splitNames, handleScrollToError } from './tools';
21
+ import { customValidate, getNamePath, splitNames, handleScrollToError, cloneDeepFilterNode } from './tools';
22
22
  import ProTooltip from '../../ProTooltip';
23
23
  import { RenderField, ActionButton } from '../components';
24
24
  import tipSvg from '../../assets/tip.svg';
25
25
  import locale from '../../locale';
26
26
  // 渲染操作栏
27
27
  var getActionColumn = function getActionColumn(config) {
28
- var disabled = config.disabled,
29
- name = config.name,
30
- form = config.form,
31
- virtualKey = config.virtualKey,
32
- validateKeys = config.validateKeys,
33
- actionWidth = config.actionWidth,
34
- actionProps = config.actionProps,
35
- page = config.page,
36
- rowDisabled = config.rowDisabled,
37
- actionDirection = config.actionDirection;
28
+ var _cloneDeepWith = cloneDeepWith(config, function (value) {
29
+ if ( /*#__PURE__*/React.isValidElement(value)) {
30
+ return value;
31
+ }
32
+ }),
33
+ disabled = _cloneDeepWith.disabled,
34
+ name = _cloneDeepWith.name,
35
+ form = _cloneDeepWith.form,
36
+ virtualKey = _cloneDeepWith.virtualKey,
37
+ validateKeys = _cloneDeepWith.validateKeys,
38
+ actionWidth = _cloneDeepWith.actionWidth,
39
+ actionProps = _cloneDeepWith.actionProps,
40
+ page = _cloneDeepWith.page,
41
+ rowDisabled = _cloneDeepWith.rowDisabled,
42
+ actionDirection = _cloneDeepWith.actionDirection;
38
43
  var pageNum = tools.calc(page.pageNum, '-', 1);
39
44
  var firstIndex = tools.calc(pageNum, '*', page.pageSize);
40
45
  // actionProps配置为false 默认不插入
@@ -195,7 +200,8 @@ export var transformColumns = function transformColumns() {
195
200
  setState = config.setState,
196
201
  page = config.page;
197
202
  var isCell = mode === 'cell';
198
- var _columns = _toConsumableArray(columns);
203
+ var _columns = cloneDeepFilterNode(columns);
204
+ // 你的函数代码
199
205
  var _cacheMap = _objectSpread({}, cacheMap.current);
200
206
  var pageNum = tools.calc(page.pageNum, '-', 1);
201
207
  var firstIndex = tools.calc(pageNum, '*', page.pageSize);
@@ -29,3 +29,9 @@ export declare const getDisabled: ({ globalControl, formDisabled, column, tabled
29
29
  /** 表格自动滚动到报错位置
30
30
  */
31
31
  export declare const handleScrollToError: () => void;
32
+ /**
33
+ * 深copy一个对象,并过滤掉其中的React节点
34
+ * @param value 需要深拷贝的对象
35
+ * @returns 深拷贝后的对象,其中的React节点会被保留
36
+ */
37
+ export declare function cloneDeepFilterNode(value: any): any;
@@ -1,5 +1,6 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
- import { cloneDeep, isString, isObject, isEqual, transform, isFunction, isBoolean } from 'lodash';
2
+ import React from 'react';
3
+ import { cloneDeep, cloneDeepWith, isString, isObject, isEqual, transform, isFunction, isBoolean } from 'lodash';
3
4
  export var getRandom = function getRandom() {
4
5
  return Math.random().toString(36).slice(-6);
5
6
  };
@@ -182,4 +183,16 @@ export var handleScrollToError = function handleScrollToError() {
182
183
  }
183
184
  }
184
185
  }, 0);
185
- };
186
+ };
187
+ /**
188
+ * 深copy一个对象,并过滤掉其中的React节点
189
+ * @param value 需要深拷贝的对象
190
+ * @returns 深拷贝后的对象,其中的React节点会被保留
191
+ */
192
+ export function cloneDeepFilterNode(value) {
193
+ return cloneDeepWith(value, function (val) {
194
+ if ( /*#__PURE__*/React.isValidElement(val)) {
195
+ return val;
196
+ }
197
+ });
198
+ }
@@ -2,17 +2,17 @@
2
2
  @import (reference) '~antd/es/style/themes/index.less';
3
3
 
4
4
  .pro-table {
5
- &.pro-table-draggable-only{
6
- .ant-table-tbody{
5
+ &.pro-table-draggable-only {
6
+ .ant-table-tbody {
7
7
  .anticon {
8
8
  margin-right: 0;
9
9
  }
10
10
  }
11
11
  }
12
12
  .@{ant-prefix}-table-cell-with-append {
13
- white-space: nowrap;
14
13
  position: relative;
15
14
  z-index: 100;
15
+ white-space: nowrap;
16
16
  }
17
17
  .@{ant-prefix}-table-row-expand-icon {
18
18
  position: absolute;
@@ -20,16 +20,15 @@
20
20
  }
21
21
 
22
22
  .@{ant-prefix}-table-content {
23
- >table {
23
+ > table {
24
24
  .@{ant-prefix}-table-summary {
25
+ color: var(--zaui-text, #343434);
26
+ font-weight: 600;
25
27
  background-color: var(--zaui-table-header-bg, #f2f3f5);
26
- color : var(--zaui-text, #343434);
27
- font-weight : 600;
28
28
 
29
29
  .@{ant-prefix}-table-cell-fix-left,
30
30
  .@{ant-prefix}-table-cell-fix-right {
31
31
  background-color: var(--zaui-table-header-bg, #f2f3f5);
32
-
33
32
  }
34
33
  }
35
34
 
@@ -43,33 +42,37 @@
43
42
  }
44
43
  }
45
44
 
46
- .@{ant-prefix}-table-thead>tr>th:not(.@{ant-prefix}-table-selection-column):not(.@{ant-prefix}-table-row-expand-icon-cell):not([colspan]).is-required {
45
+ .@{ant-prefix}-table-thead
46
+ > tr
47
+ > th:not(.@{ant-prefix}-table-selection-column):not(
48
+ .@{ant-prefix}-table-row-expand-icon-cell
49
+ ):not([colspan]).is-required {
47
50
  &.is-required-right {
48
51
  .pro-edit-table-title {
49
52
  &::before {
50
- position : static;
51
- top : 0;
52
- display : inline-block;
53
- text-indent: -8px;
54
- color : #ff5050;
55
- font-size : var(--zaui-font-size-md, 14px);
53
+ position: static;
54
+ top: 0;
55
+ display: inline-block;
56
+ color: #ff5050;
57
+ font-size: var(--zaui-font-size-md, 14px);
56
58
  line-height: 1;
57
- content : "*";
59
+ text-indent: -8px;
60
+ content: '*';
58
61
  }
59
62
  }
60
63
  }
61
64
  &.is-required-left {
62
65
  .pro-edit-table-title {
63
66
  &::after {
67
+ position: static;
68
+ top: 0;
69
+ display: inline-block;
64
70
  width: auto;
65
- position : static;
66
- top : 0;
67
- display : inline-block;
68
71
  margin-left: var(--zaui-space-size-xs, 4px);
69
- color : #ff5050;
70
- font-size : 14px;
72
+ color: #ff5050;
73
+ font-size: 14px;
71
74
  line-height: 1;
72
- content : "*";
75
+ content: '*';
73
76
  }
74
77
  }
75
78
  }
@@ -80,9 +83,9 @@
80
83
  display: flex;
81
84
  width: 20px;
82
85
  .anticon {
83
- cursor: pointer;
84
86
  margin-right: 12px;
85
- .drag-icon{
87
+ cursor: pointer;
88
+ .drag-icon {
86
89
  margin-right: 0;
87
90
  }
88
91
  }
@@ -93,8 +96,6 @@
93
96
  }
94
97
  }
95
98
 
96
-
97
-
98
99
  &.pro-table-bordered {
99
100
  .@{ant-prefix}-table .@{ant-prefix}-table-thead > tr > th {
100
101
  border-bottom: 1px solid #f0f0f0;
@@ -557,10 +558,4 @@
557
558
  }
558
559
  }
559
560
  }
560
- }
561
-
562
- .pro-edit-table-drag {
563
- table tr th.@{ant-prefix}-table-selection-column.@{ant-prefix}-table-cell-fix-left{
564
- text-align: right;
565
- }
566
- }
561
+ }
@@ -327,6 +327,7 @@
327
327
 
328
328
  .pro-edit-table-drag {
329
329
  table tr th.@{ant-prefix}-table-selection-column.@{ant-prefix}-table-cell-fix-left{
330
- text-align: right;
330
+ text-align: left;
331
+ padding-left: 52px;
331
332
  }
332
333
  }
@@ -6,4 +6,4 @@
6
6
  * @param columns 表格配置数据
7
7
  * @param config
8
8
  */
9
- export declare const transformColumns: (columns: any[], config: any) => any[];
9
+ export declare const transformColumns: (columns: any[], config: any) => any;
@@ -29,16 +29,21 @@ var _excluded = ["type", "label", "show", "needConfirm", "onHandle", "onClick"],
29
29
  _excluded2 = ["title", "icon"];
30
30
  // 渲染操作栏
31
31
  var getActionColumn = function getActionColumn(config) {
32
- var disabled = config.disabled,
33
- name = config.name,
34
- form = config.form,
35
- virtualKey = config.virtualKey,
36
- validateKeys = config.validateKeys,
37
- actionWidth = config.actionWidth,
38
- actionProps = config.actionProps,
39
- page = config.page,
40
- rowDisabled = config.rowDisabled,
41
- actionDirection = config.actionDirection;
32
+ var _cloneDeepWith = (0, _lodash.cloneDeepWith)(config, function (value) {
33
+ if ( /*#__PURE__*/_react.default.isValidElement(value)) {
34
+ return value;
35
+ }
36
+ }),
37
+ disabled = _cloneDeepWith.disabled,
38
+ name = _cloneDeepWith.name,
39
+ form = _cloneDeepWith.form,
40
+ virtualKey = _cloneDeepWith.virtualKey,
41
+ validateKeys = _cloneDeepWith.validateKeys,
42
+ actionWidth = _cloneDeepWith.actionWidth,
43
+ actionProps = _cloneDeepWith.actionProps,
44
+ page = _cloneDeepWith.page,
45
+ rowDisabled = _cloneDeepWith.rowDisabled,
46
+ actionDirection = _cloneDeepWith.actionDirection;
42
47
  var pageNum = _utils.tools.calc(page.pageNum, '-', 1);
43
48
  var firstIndex = _utils.tools.calc(pageNum, '*', page.pageSize);
44
49
  // actionProps配置为false 默认不插入
@@ -199,7 +204,8 @@ var transformColumns = exports.transformColumns = function transformColumns() {
199
204
  setState = config.setState,
200
205
  page = config.page;
201
206
  var isCell = mode === 'cell';
202
- var _columns = (0, _toConsumableArray2.default)(columns);
207
+ var _columns = (0, _tools.cloneDeepFilterNode)(columns);
208
+ // 你的函数代码
203
209
  var _cacheMap = (0, _objectSpread2.default)({}, cacheMap.current);
204
210
  var pageNum = _utils.tools.calc(page.pageNum, '-', 1);
205
211
  var firstIndex = _utils.tools.calc(pageNum, '*', page.pageSize);
@@ -29,3 +29,9 @@ export declare const getDisabled: ({ globalControl, formDisabled, column, tabled
29
29
  /** 表格自动滚动到报错位置
30
30
  */
31
31
  export declare const handleScrollToError: () => void;
32
+ /**
33
+ * 深copy一个对象,并过滤掉其中的React节点
34
+ * @param value 需要深拷贝的对象
35
+ * @returns 深拷贝后的对象,其中的React节点会被保留
36
+ */
37
+ export declare function cloneDeepFilterNode(value: any): any;
@@ -4,8 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
+ exports.cloneDeepFilterNode = cloneDeepFilterNode;
7
8
  exports.splitNames = exports.onDelete = exports.handleScrollToError = exports.getRandom = exports.getNamePath = exports.getDisabled = exports.difference = exports.customValidate = void 0;
8
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
+ var _react = _interopRequireDefault(require("react"));
9
11
  var _lodash = require("lodash");
10
12
  var getRandom = exports.getRandom = function getRandom() {
11
13
  return Math.random().toString(36).slice(-6);
@@ -189,4 +191,16 @@ var handleScrollToError = exports.handleScrollToError = function handleScrollToE
189
191
  }
190
192
  }
191
193
  }, 0);
192
- };
194
+ };
195
+ /**
196
+ * 深copy一个对象,并过滤掉其中的React节点
197
+ * @param value 需要深拷贝的对象
198
+ * @returns 深拷贝后的对象,其中的React节点会被保留
199
+ */
200
+ function cloneDeepFilterNode(value) {
201
+ return (0, _lodash.cloneDeepWith)(value, function (val) {
202
+ if ( /*#__PURE__*/_react.default.isValidElement(val)) {
203
+ return val;
204
+ }
205
+ });
206
+ }
@@ -2,17 +2,17 @@
2
2
  @import (reference) '~antd/es/style/themes/index.less';
3
3
 
4
4
  .pro-table {
5
- &.pro-table-draggable-only{
6
- .ant-table-tbody{
5
+ &.pro-table-draggable-only {
6
+ .ant-table-tbody {
7
7
  .anticon {
8
8
  margin-right: 0;
9
9
  }
10
10
  }
11
11
  }
12
12
  .@{ant-prefix}-table-cell-with-append {
13
- white-space: nowrap;
14
13
  position: relative;
15
14
  z-index: 100;
15
+ white-space: nowrap;
16
16
  }
17
17
  .@{ant-prefix}-table-row-expand-icon {
18
18
  position: absolute;
@@ -20,16 +20,15 @@
20
20
  }
21
21
 
22
22
  .@{ant-prefix}-table-content {
23
- >table {
23
+ > table {
24
24
  .@{ant-prefix}-table-summary {
25
+ color: var(--zaui-text, #343434);
26
+ font-weight: 600;
25
27
  background-color: var(--zaui-table-header-bg, #f2f3f5);
26
- color : var(--zaui-text, #343434);
27
- font-weight : 600;
28
28
 
29
29
  .@{ant-prefix}-table-cell-fix-left,
30
30
  .@{ant-prefix}-table-cell-fix-right {
31
31
  background-color: var(--zaui-table-header-bg, #f2f3f5);
32
-
33
32
  }
34
33
  }
35
34
 
@@ -43,33 +42,37 @@
43
42
  }
44
43
  }
45
44
 
46
- .@{ant-prefix}-table-thead>tr>th:not(.@{ant-prefix}-table-selection-column):not(.@{ant-prefix}-table-row-expand-icon-cell):not([colspan]).is-required {
45
+ .@{ant-prefix}-table-thead
46
+ > tr
47
+ > th:not(.@{ant-prefix}-table-selection-column):not(
48
+ .@{ant-prefix}-table-row-expand-icon-cell
49
+ ):not([colspan]).is-required {
47
50
  &.is-required-right {
48
51
  .pro-edit-table-title {
49
52
  &::before {
50
- position : static;
51
- top : 0;
52
- display : inline-block;
53
- text-indent: -8px;
54
- color : #ff5050;
55
- font-size : var(--zaui-font-size-md, 14px);
53
+ position: static;
54
+ top: 0;
55
+ display: inline-block;
56
+ color: #ff5050;
57
+ font-size: var(--zaui-font-size-md, 14px);
56
58
  line-height: 1;
57
- content : "*";
59
+ text-indent: -8px;
60
+ content: '*';
58
61
  }
59
62
  }
60
63
  }
61
64
  &.is-required-left {
62
65
  .pro-edit-table-title {
63
66
  &::after {
67
+ position: static;
68
+ top: 0;
69
+ display: inline-block;
64
70
  width: auto;
65
- position : static;
66
- top : 0;
67
- display : inline-block;
68
71
  margin-left: var(--zaui-space-size-xs, 4px);
69
- color : #ff5050;
70
- font-size : 14px;
72
+ color: #ff5050;
73
+ font-size: 14px;
71
74
  line-height: 1;
72
- content : "*";
75
+ content: '*';
73
76
  }
74
77
  }
75
78
  }
@@ -80,9 +83,9 @@
80
83
  display: flex;
81
84
  width: 20px;
82
85
  .anticon {
83
- cursor: pointer;
84
86
  margin-right: 12px;
85
- .drag-icon{
87
+ cursor: pointer;
88
+ .drag-icon {
86
89
  margin-right: 0;
87
90
  }
88
91
  }
@@ -93,8 +96,6 @@
93
96
  }
94
97
  }
95
98
 
96
-
97
-
98
99
  &.pro-table-bordered {
99
100
  .@{ant-prefix}-table .@{ant-prefix}-table-thead > tr > th {
100
101
  border-bottom: 1px solid #f0f0f0;
@@ -557,10 +558,4 @@
557
558
  }
558
559
  }
559
560
  }
560
- }
561
-
562
- .pro-edit-table-drag {
563
- table tr th.@{ant-prefix}-table-selection-column.@{ant-prefix}-table-cell-fix-left{
564
- text-align: right;
565
- }
566
- }
561
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.6.10-beta.2",
3
+ "version": "3.6.10-beta.4",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",