@zat-design/sisyphus-react 3.3.0 → 3.3.1-beta.1

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 (64) hide show
  1. package/dist/index.esm.css +13 -2
  2. package/es/ProEditTable/components/RenderField/index.js +6 -4
  3. package/es/ProEditTable/index.js +29 -18
  4. package/es/ProEnum/index.js +7 -18
  5. package/es/ProEnum/propsType.d.ts +1 -0
  6. package/es/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
  7. package/es/ProForm/components/combination/FormList/index.js +1 -1
  8. package/es/ProForm/components/combination/Group/index.js +4 -4
  9. package/es/ProForm/components/combination/Group/utils.d.ts +0 -2
  10. package/es/ProForm/components/combination/Group/utils.js +0 -13
  11. package/es/ProForm/components/combination/ProModalSelect/index.js +22 -25
  12. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +9 -2
  13. package/es/ProForm/components/render/Render.js +17 -24
  14. package/es/ProForm/components/render/RenderFields.js +7 -3
  15. package/es/ProForm/utils/rulesCreator.js +2 -1
  16. package/es/ProForm/utils/useForm.js +15 -7
  17. package/es/ProForm/utils/useRules.js +6 -5
  18. package/es/ProStep/index.js +2 -2
  19. package/es/ProTable/style/index.less +6 -6
  20. package/es/ProTreeModal/components/Trigger.js +2 -0
  21. package/es/ProTreeModal/index.js +3 -3
  22. package/es/ProTreeModal/style/index.less +85 -84
  23. package/es/ProUpload/components/DragRender.js +2 -1
  24. package/es/ProUpload/components/ImageRender.js +4 -5
  25. package/es/assets/architecture.png +0 -0
  26. package/es/assets/dataShare.png +0 -0
  27. package/es/assets/generate.png +0 -0
  28. package/es/assets/import.png +0 -0
  29. package/es/assets/loadBalancer.png +0 -0
  30. package/es/assets/shipConfig.png +0 -0
  31. package/es/assets/subProjectConfig.png +0 -0
  32. package/es/assets/swaggerUrl.png +0 -0
  33. package/lib/ProEditTable/components/RenderField/index.js +6 -4
  34. package/lib/ProEditTable/index.js +29 -18
  35. package/lib/ProEnum/index.js +6 -17
  36. package/lib/ProEnum/propsType.d.ts +1 -0
  37. package/lib/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
  38. package/lib/ProForm/components/combination/FormList/index.js +1 -1
  39. package/lib/ProForm/components/combination/Group/index.js +3 -3
  40. package/lib/ProForm/components/combination/Group/utils.d.ts +0 -2
  41. package/lib/ProForm/components/combination/Group/utils.js +1 -14
  42. package/lib/ProForm/components/combination/ProModalSelect/index.js +22 -25
  43. package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +9 -2
  44. package/lib/ProForm/components/render/Render.js +17 -24
  45. package/lib/ProForm/components/render/RenderFields.js +6 -2
  46. package/lib/ProForm/utils/rulesCreator.js +2 -1
  47. package/lib/ProForm/utils/useForm.js +15 -7
  48. package/lib/ProForm/utils/useRules.js +5 -4
  49. package/lib/ProStep/index.js +1 -1
  50. package/lib/ProTable/style/index.less +6 -6
  51. package/lib/ProTreeModal/components/Trigger.js +2 -0
  52. package/lib/ProTreeModal/index.js +3 -3
  53. package/lib/ProTreeModal/style/index.less +85 -84
  54. package/lib/ProUpload/components/DragRender.js +2 -1
  55. package/lib/ProUpload/components/ImageRender.js +4 -5
  56. package/lib/assets/architecture.png +0 -0
  57. package/lib/assets/dataShare.png +0 -0
  58. package/lib/assets/generate.png +0 -0
  59. package/lib/assets/import.png +0 -0
  60. package/lib/assets/loadBalancer.png +0 -0
  61. package/lib/assets/shipConfig.png +0 -0
  62. package/lib/assets/subProjectConfig.png +0 -0
  63. package/lib/assets/swaggerUrl.png +0 -0
  64. package/package.json +1 -1
@@ -64,13 +64,13 @@
64
64
  }
65
65
 
66
66
  .@{ant-prefix}-table-body {
67
- // .@{ant-prefix}-table-tbody .@{ant-prefix}-table-row:nth-child(odd).new-cell {
68
- // background: #00ae4d !important;
67
+ .@{ant-prefix}-table-tbody .@{ant-prefix}-table-row:nth-child(odd).new-cell {
68
+ background: #d2fff4 !important;
69
69
 
70
- // td {
71
- // background: #00ae4d !important;
72
- // }
73
- // }
70
+ td {
71
+ background: #d2fff4 !important;
72
+ }
73
+ }
74
74
 
75
75
  .@{ant-prefix}-table-cell .varied-cell {
76
76
  margin-left: -8px;
@@ -79,6 +79,8 @@ function Trigger(props) {
79
79
  return _jsxs(_Space.Compact, {
80
80
  block: true,
81
81
  children: [_jsxs(_Select, {
82
+ disabled: disabled,
83
+ className: classNames(disabled ? 'trigger-no-hover' : '', appoint ? 'pro-tree-modal-input-appoint' : ''),
82
84
  defaultValue: "appoint",
83
85
  value: state.mode,
84
86
  onChange: onAppointChange,
@@ -65,9 +65,9 @@ var ProTreeModal = function ProTreeModal(props) {
65
65
  children: 'children'
66
66
  } : _props$fieldNames,
67
67
  _props$disabled = props.disabled,
68
- disabled = _props$disabled === void 0 ? props.disabled || (props === null || props === void 0 ? void 0 : (_props$otherProps = props.otherProps) === null || _props$otherProps === void 0 ? void 0 : _props$otherProps.isView) || false : _props$disabled,
68
+ disabled = _props$disabled === void 0 ? props.disabled || props.isView || (props === null || props === void 0 ? void 0 : (_props$otherProps = props.otherProps) === null || _props$otherProps === void 0 ? void 0 : _props$otherProps.isView) || false : _props$disabled,
69
69
  _props$isView = props.isView,
70
- isView = _props$isView === void 0 ? (props === null || props === void 0 ? void 0 : (_props$otherProps2 = props.otherProps) === null || _props$otherProps2 === void 0 ? void 0 : _props$otherProps2.isView) || false : _props$isView,
70
+ isView = _props$isView === void 0 ? props.isView || (props === null || props === void 0 ? void 0 : (_props$otherProps2 = props.otherProps) === null || _props$otherProps2 === void 0 ? void 0 : _props$otherProps2.isView) || false : _props$isView,
71
71
  transformResponse = props.transformResponse,
72
72
  optionRender = props.optionRender,
73
73
  openChange = props.openChange,
@@ -169,7 +169,7 @@ var ProTreeModal = function ProTreeModal(props) {
169
169
  allKeys = state.allKeys,
170
170
  originalTreeData = state.originalTreeData;
171
171
  var treeViewData = [];
172
- if (allValue && typeof value === 'string') {
172
+ if (allValue && typeof value === 'string' && allValue === value) {
173
173
  if (modeType === LIST) {
174
174
  checkedValues = treeData.map(function (item) {
175
175
  return item[fieldNameValue];
@@ -11,31 +11,31 @@
11
11
  }
12
12
 
13
13
  &-content {
14
- display : flex;
14
+ display: flex;
15
15
  flex-direction: row;
16
- height : 482px;
17
- margin-bottom : calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
16
+ height: 482px;
17
+ margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
18
18
 
19
19
  .@{ant-prefix}-tree-checkbox {
20
20
  margin-top: 2px;
21
21
  }
22
22
 
23
23
  .@{ant-prefix}-tree-switcher {
24
- width : 20px;
24
+ width: 20px;
25
25
  line-height: 20px;
26
26
  }
27
27
 
28
28
  .@{ant-prefix}-tree-treenode {
29
- width : 100%;
30
- padding : 0;
29
+ width: 100%;
30
+ padding: 0;
31
31
  padding-bottom: var(--zaui-font-size-sm, 12px);
32
- color : var(--zaui-text);
33
- font-size : var(--zaui-font-size, 14px);
34
- line-height : 20px;
32
+ color: var(--zaui-text);
33
+ font-size: var(--zaui-font-size, 14px);
34
+ line-height: 20px;
35
35
  }
36
36
 
37
37
  .@{ant-prefix}-tree-node-content-wrapper {
38
- min-height : 20px;
38
+ min-height: 20px;
39
39
  line-height: 20px;
40
40
  }
41
41
 
@@ -45,27 +45,27 @@
45
45
  }
46
46
 
47
47
  &-box {
48
- display : flex;
48
+ display: flex;
49
49
  flex-direction: column;
50
- width : 456px;
51
- height : 100%;
52
- color : var(--zaui-text);
53
- font-size : var(--zaui-font-size, 14px);
54
- line-height : 20px;
55
- border : 1px solid #e6e6e6;
56
- border-radius : var(--zaui-border-radius, 4px);
50
+ width: 456px;
51
+ height: 100%;
52
+ color: var(--zaui-text);
53
+ font-size: var(--zaui-font-size, 14px);
54
+ line-height: 20px;
55
+ border: 1px solid #e6e6e6;
56
+ border-radius: var(--zaui-border-radius, 4px);
57
57
 
58
58
  &:first-child {
59
59
  margin-right: var(--zaui-space-size-md, 16px);
60
60
  }
61
61
 
62
- .viewSvg>div {
62
+ .viewSvg > div {
63
63
  display: flex;
64
64
  }
65
65
 
66
66
  /* 修改滚动条样式 */
67
67
  ::-webkit-scrollbar {
68
- width : 0;
68
+ width: 0;
69
69
  height: 0;
70
70
  }
71
71
  }
@@ -79,38 +79,38 @@
79
79
  }
80
80
 
81
81
  &-search {
82
- width : auto;
82
+ width: auto;
83
83
  margin: var(--zaui-space-size-sm, 8px) var(--zaui-space-size-md, 16px) 0;
84
84
  }
85
85
 
86
86
  &-cascader-flex {
87
- display : flex;
87
+ display: flex;
88
88
  flex-direction: row;
89
- height : 100%;
90
- overflow : hidden;
89
+ height: 100%;
90
+ overflow: hidden;
91
91
  }
92
92
 
93
93
  &-cascader-warp {
94
- display : flex;
94
+ display: flex;
95
95
  flex-direction: column;
96
- width : 350px;
97
- margin-left : var(--zaui-space-size-md, 16px);
98
- overflow : auto;
96
+ width: 350px;
97
+ margin-left: var(--zaui-space-size-md, 16px);
98
+ overflow: auto;
99
99
 
100
100
  &:first-child {
101
- width : 192px;
102
- margin-left : 0;
101
+ width: 192px;
102
+ margin-left: 0;
103
103
  border-right: 1px solid #e6e6e6;
104
104
  }
105
105
  }
106
106
 
107
107
  &-box-header {
108
- display : flex;
109
- align-items : center;
108
+ display: flex;
109
+ align-items: center;
110
110
  justify-content: space-between;
111
- height : 40px;
112
- padding : 0 var(--zaui-space-size-md, 16px);
113
- background : #fafafa;
111
+ height: 40px;
112
+ padding: 0 var(--zaui-space-size-md, 16px);
113
+ background: #fafafa;
114
114
 
115
115
  &:first-child {
116
116
  color: #616161;
@@ -122,20 +122,20 @@
122
122
  }
123
123
 
124
124
  &-tree-warp {
125
- flex : 1;
126
- margin : 0 var(--zaui-space-size-md, 16px);
125
+ flex: 1;
126
+ margin: 0 var(--zaui-space-size-md, 16px);
127
127
  padding-top: var(--zaui-space-size-sm, 8px);
128
- overflow-y : auto;
128
+ overflow-y: auto;
129
129
  }
130
130
 
131
131
  &-checkbox-content {
132
- display : flex;
133
- flex-direction : row;
134
- align-items : center;
132
+ display: flex;
133
+ flex-direction: row;
134
+ align-items: center;
135
135
  justify-content: space-between;
136
- margin-bottom : calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
137
- line-height : 20px;
138
- cursor : pointer;
136
+ margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
137
+ line-height: 20px;
138
+ cursor: pointer;
139
139
 
140
140
  &-look {
141
141
  color: #333;
@@ -148,16 +148,16 @@
148
148
 
149
149
  &-cascader-content {
150
150
  margin-bottom: 0;
151
- padding : 6px;
151
+ padding: 6px;
152
152
  }
153
153
 
154
154
  &-check-cascader-content {
155
- color : var(--zaui-brand);
155
+ color: var(--zaui-brand);
156
156
  background: rgba(0, 106, 255, 0.1);
157
157
  }
158
158
 
159
159
  &-isView {
160
- display : flex;
160
+ display: flex;
161
161
  align-items: center;
162
162
 
163
163
  .viewSvg {
@@ -175,11 +175,12 @@
175
175
 
176
176
  &-checkbox-close {
177
177
  padding-left: var(--zaui-space-size-sm, 8px);
178
- font-size : var(--zaui-font-size-sm, 12px);
178
+ color: #c5c7cd;
179
+ font-size: var(--zaui-font-size-sm, 12px);
179
180
  }
180
181
 
181
182
  &-tree-node {
182
- display : flex;
183
+ display: flex;
183
184
  flex-direction: row;
184
185
 
185
186
  &:last-child {
@@ -188,34 +189,34 @@
188
189
  }
189
190
 
190
191
  &-tree-node-tag {
191
- display : flex;
192
- align-items : center;
192
+ display: flex;
193
+ align-items: center;
193
194
  justify-content: center;
194
- height : 20px;
195
- margin-right : var(--zaui-space-size-sm, 8px);
196
- padding : 0 var(--zaui-space-size-xs);
197
- font-weight : 400;
198
- line-height : 24px;
199
- white-space : nowrap;
200
- border-radius : var(--zaui-border-radius-card);
195
+ height: 20px;
196
+ margin-right: var(--zaui-space-size-sm, 8px);
197
+ padding: 0 var(--zaui-space-size-xs);
198
+ font-weight: 400;
199
+ line-height: 24px;
200
+ white-space: nowrap;
201
+ border-radius: var(--zaui-border-radius-card);
201
202
 
202
203
  span {
203
- font-size : var(--zaui-font-size-sm, 12px);
204
+ font-size: var(--zaui-font-size-sm, 12px);
204
205
  line-height: 20px;
205
- text-align : center;
206
- transform : scale(0.83, 0.83);
206
+ text-align: center;
207
+ transform: scale(0.83, 0.83);
207
208
  }
208
209
  }
209
210
  }
210
211
 
211
212
  .pro-tree-modal-no-checks {
212
- display : flex;
213
- align-items : center;
213
+ display: flex;
214
+ align-items: center;
214
215
  justify-content: center;
215
- height : 100%;
216
- color : #939599;
217
- font-weight : 400;
218
- font-size : var(--zaui-font-size, 14px);
216
+ height: 100%;
217
+ color: #939599;
218
+ font-weight: 400;
219
+ font-size: var(--zaui-font-size, 14px);
219
220
  }
220
221
 
221
222
  .pro-transfer-right {
@@ -227,37 +228,37 @@
227
228
  }
228
229
 
229
230
  .@{ant-prefix}-tag {
230
- display : flex;
231
- align-items : center;
231
+ display: flex;
232
+ align-items: center;
232
233
  justify-content: space-between;
233
- width : 100%;
234
- height : 32px;
235
- padding : 2px var(--zaui-space-size-sm, 8px);
236
- color : var(--zaui-text, #343434);
237
- font-size : var(--zaui-font-size, 14px);
238
- background : #f2f2f2;
239
- border : none;
240
- border-radius : var(--zaui-border-radius, 4px);
234
+ width: 100%;
235
+ height: 32px;
236
+ padding: 2px var(--zaui-space-size-sm, 8px);
237
+ color: var(--zaui-text, #343434);
238
+ font-size: var(--zaui-font-size, 14px);
239
+ background: #f2f2f2;
240
+ border: none;
241
+ border-radius: var(--zaui-border-radius, 4px);
241
242
 
242
243
  .drag-icon {
243
- height : 20px;
244
+ height: 20px;
244
245
  margin-right: var(--zaui-space-size-xs, 4px);
245
- cursor : move;
246
+ cursor: move;
246
247
  }
247
248
 
248
249
  .pro-tooltip {
249
- flex : 1;
250
+ flex: 1;
250
251
  max-width: calc(100% - 42px);
251
252
  }
252
253
 
253
254
  .disabled-icon {
254
- height : 20px;
255
+ height: 20px;
255
256
  margin-right: var(--zaui-space-size-xs, 4px);
256
257
  }
257
258
 
258
259
  .anticon-close {
259
- margin : 0;
260
- color : #999;
260
+ margin: 0;
261
+ color: #999;
261
262
  font-size: var(--zaui-font-size-sm, 12px);
262
263
  }
263
264
  }
@@ -265,7 +266,7 @@
265
266
  &.dragable {
266
267
  .anticon-close {
267
268
  position: relative;
268
- left : -4px;
269
+ left: -4px;
269
270
  }
270
271
  }
271
272
 
@@ -52,7 +52,8 @@ var DragRender = function DragRender(props) {
52
52
  */
53
53
  var handleReSelect = function handleReSelect(file) {
54
54
  if (disabled) return;
55
- handleDelFile(file);
55
+ // handleDelFile(file);
56
+ setFileList([]);
56
57
  setTimeout(function () {
57
58
  refReSelect.current.click();
58
59
  }, 1);
@@ -17,7 +17,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
17
17
  * @Author: wangshengqiang
18
18
  * @Date: 2023-07-27 20:13:07
19
19
  * @LastEditors: wangshengqiang
20
- * @LastEditTime: 2023-11-15 17:57:53
20
+ * @LastEditTime: 2023-11-21 15:24:56
21
21
  * @Description: 图片类型
22
22
  *
23
23
  */
@@ -97,11 +97,11 @@ var ImageRender = function ImageRender(props) {
97
97
  disabled: disabled || isView,
98
98
  itemRender: function itemRender(originNode, file, fileList, actions) {
99
99
  var _file$url, _locale$ProUpload, _locale$ProUpload2, _locale$ProUpload3;
100
- var _showPreview = file.status === 'done';
101
100
  var _isShowDownload = !!onDownload && file.status === 'done';
102
101
  var _fileExt = getFileExt(file.name || (file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('?')[0]));
103
102
  var _fileIcon = getFileIcon(_fileExt);
104
103
  var isImg = ['.PNG', '.JPG', '.JPEG', '.GIF', '.BMP', '.JPE'].includes(_fileExt.toLocaleUpperCase());
104
+ var _showPreview = isImg;
105
105
  return _jsx(DraggableUploadListItem, {
106
106
  file: file,
107
107
  children: _jsxs("div", {
@@ -255,8 +255,7 @@ var ImageRender = function ImageRender(props) {
255
255
  style: {
256
256
  width: '400px'
257
257
  },
258
- open: !!(previewImg === null || previewImg === void 0 ? void 0 : previewImg.url),
259
- // showType="Modal"
258
+ open: (previewImg === null || previewImg === void 0 ? void 0 : previewImg.url) || (previewImg === null || previewImg === void 0 ? void 0 : previewImg.thumbUrl),
260
259
  wrapClassName: "proupload-modal-preview",
261
260
  onCancel: handlePreviewCancel,
262
261
  footer: false,
@@ -265,7 +264,7 @@ var ImageRender = function ImageRender(props) {
265
264
  style: {
266
265
  width: '100%'
267
266
  },
268
- src: previewImg === null || previewImg === void 0 ? void 0 : previewImg.url
267
+ src: (previewImg === null || previewImg === void 0 ? void 0 : previewImg.url) || previewImg.thumbUrl
269
268
  })
270
269
  })]
271
270
  });
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -509,7 +509,7 @@ var RenderField = function RenderField(_ref) {
509
509
  delete _formItemProps.rules;
510
510
  }
511
511
  var _className = (0, _classnames.default)((_classNames = {}, (0, _defineProperty2.default)(_classNames, className, className), (0, _defineProperty2.default)(_classNames, 'pro-form-item-changed', changed), _classNames));
512
- var originalTitle = (0, _jsxRuntime.jsxs)(_antd.Space, {
512
+ var originalTitle = originalTip ? (0, _jsxRuntime.jsxs)(_antd.Space, {
513
513
  children: ["\u521D\u59CB\u503C\uFF1A", /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? /*#__PURE__*/_react.default.cloneElement(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(componentProps, ['onFieldChange'])), {}, {
514
514
  isView: true,
515
515
  value: originalValue,
@@ -519,14 +519,16 @@ var RenderField = function RenderField(_ref) {
519
519
  value: originalValue,
520
520
  checked: type === 'Switch' ? originalValue : undefined
521
521
  }))]
522
- });
523
- var FormItem = (0, _jsxRuntime.jsx)(_antd.Form.Item, (0, _objectSpread2.default)((0, _objectSpread2.default)({
522
+ }) : null;
523
+ var FormItem = TargetComponent ? (0, _jsxRuntime.jsx)(_antd.Form.Item, (0, _objectSpread2.default)((0, _objectSpread2.default)({
524
524
  validateFirst: true
525
525
  }, (0, _lodash.omit)(_formItemProps, ['render', 'cache', 'key', 'width', 'hiddenNames', 'name'])), {}, {
526
526
  className: _className,
527
527
  name: cellName,
528
528
  children: /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? /*#__PURE__*/_react.default.cloneElement(TargetComponent, (0, _objectSpread2.default)({}, (0, _lodash.omit)(componentProps, ['onFieldChange']))) : (0, _jsxRuntime.jsx)(TargetComponent, (0, _objectSpread2.default)({}, (0, _lodash.omit)(componentProps, ['onFieldChange'])))
529
- }));
529
+ })) : (0, _jsxRuntime.jsx)(_Container.default, {
530
+ viewEmpty: viewEmpty
531
+ });
530
532
  return (0, _jsxRuntime.jsx)(_useFieldProps.FieldProvider, {
531
533
  value: componentProps === null || componentProps === void 0 ? void 0 : componentProps.otherProps,
532
534
  children: !originalTip || ['FormList', 'ProEditTable'].includes(type) ? FormItem : (0, _jsxRuntime.jsx)(_antd.Tooltip, {
@@ -23,7 +23,7 @@ var _tools = require("./utils/tools");
23
23
  var _components = require("./components");
24
24
  var _empty = _interopRequireDefault(require("../assets/empty.png"));
25
25
  var _locale = _interopRequireWildcard(require("../locale"));
26
- var _excluded = ["value", "onChange", "className", "columns", "type", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "otherProps", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "originalTip"];
26
+ var _excluded = ["value", "onChange", "className", "columns", "type", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "otherProps", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "originalTip", "rowKey"];
27
27
  var ProEditTable = function ProEditTable(_ref, ref) {
28
28
  var _resetProps$id, _resetProps$id$split, _value$2;
29
29
  var value = _ref.value,
@@ -53,6 +53,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
53
53
  pagination = _ref.pagination,
54
54
  originalValues = _ref.originalValues,
55
55
  originalTip = _ref.originalTip,
56
+ rowKey = _ref.rowKey,
56
57
  resetProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
57
58
  // 上下文form
58
59
  var contentForm = _antd.Form.useFormInstance();
@@ -100,21 +101,14 @@ var ProEditTable = function ProEditTable(_ref, ref) {
100
101
  'pro-table-no-stripe': !stripe,
101
102
  className: className
102
103
  });
103
- // 编辑行设置下样式
104
- var _rowClassName = function _rowClassName(record) {
105
- return !virtualKey || editingKeys.includes(record.rowKey) ? 'is-editing' : '';
106
- };
107
- // 复选框
108
- var _rowSelection = (0, _objectSpread2.default)({
109
- fixed: true,
110
- selectedRowKeys: selectedRowKeys,
111
- onChange: function onChange(selectedRowKeys, selectedRows) {
112
- setState({
113
- selectedRowKeys: selectedRowKeys,
114
- selectedRows: selectedRows
115
- });
104
+ var getRowKey = function getRowKey(record) {
105
+ var key = record.rowKey || (0, _tools.getRandom)();
106
+ if (rowKey) {
107
+ var _ref2;
108
+ key = (_ref2 = typeof rowKey === 'function' ? rowKey(record) : record[rowKey]) !== null && _ref2 !== void 0 ? _ref2 : key;
116
109
  }
117
- }, rowSelection);
110
+ return key;
111
+ };
118
112
  var config = {
119
113
  form: form,
120
114
  mode: mode,
@@ -147,6 +141,23 @@ var ProEditTable = function ProEditTable(_ref, ref) {
147
141
  originalTip: originalTip,
148
142
  prefixCls: prefixCls
149
143
  };
144
+ // 编辑行设置下样式
145
+ var _rowClassName = function _rowClassName(record) {
146
+ var isEdit = !virtualKey || editingKeys.includes(record.rowKey);
147
+ var className = isEdit ? 'is-editing' : '';
148
+ return className;
149
+ };
150
+ // 复选框
151
+ var _rowSelection = (0, _objectSpread2.default)({
152
+ fixed: true,
153
+ selectedRowKeys: selectedRowKeys,
154
+ onChange: function onChange(selectedRowKeys, selectedRows) {
155
+ setState({
156
+ selectedRowKeys: selectedRowKeys,
157
+ selectedRows: selectedRows
158
+ });
159
+ }
160
+ }, rowSelection);
150
161
  // 判断是否禁止添加、批量删除
151
162
  var isForbiddenBtn = (0, _react.useCallback)(function (type) {
152
163
  // 当工具栏不渲染时,都不渲染
@@ -205,7 +216,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
205
216
  return isForbiddenBtn('mulDelete') ? rowSelection : _rowSelection;
206
217
  };
207
218
  var setColumns = /*#__PURE__*/function () {
208
- var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
219
+ var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
209
220
  var nextColumns;
210
221
  return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
211
222
  while (1) switch (_context.prev = _context.next) {
@@ -224,7 +235,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
224
235
  }, _callee);
225
236
  }));
226
237
  return function setColumns() {
227
- return _ref2.apply(this, arguments);
238
+ return _ref3.apply(this, arguments);
228
239
  };
229
240
  }();
230
241
  (0, _ahooks.useDebounceEffect)(function () {
@@ -240,7 +251,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
240
251
  if ((value === null || value === void 0 ? void 0 : value.length) && !(value === null || value === void 0 ? void 0 : (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.rowKey)) {
241
252
  var nextValues = value === null || value === void 0 ? void 0 : value.map(function (item) {
242
253
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
243
- rowKey: (0, _tools.getRandom)()
254
+ rowKey: getRowKey(item)
244
255
  });
245
256
  });
246
257
  onChange(nextValues);
@@ -80,7 +80,6 @@ var ProEnum = function ProEnum(props) {
80
80
  var _useProConfig = (0, _ProConfigProvider.useProConfig)('ProEnum'),
81
81
  _useProConfig$dics = _useProConfig.dics,
82
82
  dics = _useProConfig$dics === void 0 ? {} : _useProConfig$dics;
83
- // const enumList = dics?.[code] || [];
84
83
  var _useRequestFunc = (0, _ahooks.useRequest)(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, (0, _objectSpread2.default)((0, _objectSpread2.default)({
85
84
  manual: true,
86
85
  cacheTime: -1
@@ -174,26 +173,16 @@ var ProEnum = function ProEnum(props) {
174
173
  onChange: onChange
175
174
  }));
176
175
  case 'Radio':
177
- return (0, _jsxRuntime.jsx)(_antd.Radio.Group, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, enumProps), {}, {
176
+ return (0, _jsxRuntime.jsx)(_antd.Radio.Group, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(enumProps, ['fieldNames'])), {}, {
177
+ options: list,
178
178
  value: value,
179
- onChange: onChange,
180
- children: list.map(function (item) {
181
- return (0, _jsxRuntime.jsx)(_antd.Radio, {
182
- value: item[fieldValue],
183
- children: item[label]
184
- }, item[fieldValue]);
185
- })
179
+ onChange: onChange
186
180
  }));
187
181
  case 'Checkbox':
188
- return (0, _jsxRuntime.jsx)(_antd.Checkbox.Group, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, enumProps), {}, {
182
+ return (0, _jsxRuntime.jsx)(_antd.Checkbox.Group, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(enumProps, ['fieldNames'])), {}, {
183
+ options: list,
189
184
  value: value,
190
- onChange: onChange,
191
- children: list.map(function (item) {
192
- return (0, _jsxRuntime.jsx)(_antd.Checkbox, {
193
- value: item[fieldValue],
194
- children: item[label]
195
- }, item[fieldValue]);
196
- })
185
+ onChange: onChange
197
186
  }));
198
187
  case 'Tag':
199
188
  return (0, _jsxRuntime.jsx)(_Tag.default, {
@@ -6,6 +6,7 @@ import { PropSelectProps } from '../ProSelect/propsType';
6
6
  export interface DataOption {
7
7
  label?: string;
8
8
  value?: string;
9
+ disabled?: boolean;
9
10
  [key: string]: any;
10
11
  }
11
12
  export interface ProEnumConfig {
@@ -146,13 +146,13 @@ var ActionButton = function ActionButton(props) {
146
146
  align: "start",
147
147
  className: "pro-form-list-action",
148
148
  children: actionProps === null || actionProps === void 0 ? void 0 : actionProps.map(function (item) {
149
- if (item.show === false) return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {});
149
+ if (item.show === false) return (0, _jsxRuntime.jsx)("span", {}, "".concat(item === null || item === void 0 ? void 0 : item.actionType).concat(index));
150
150
  if ((0, _lodash.isFunction)(item.show) && !item.show(form.getFieldValue(namePath), {
151
151
  namePath: namePath,
152
152
  index: index,
153
153
  form: form
154
154
  })) {
155
- return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {});
155
+ return (0, _jsxRuntime.jsx)("span", {}, "".concat(item === null || item === void 0 ? void 0 : item.actionType).concat(index));
156
156
  }
157
157
  var label = item.label,
158
158
  onClick = item.onClick,
@@ -68,7 +68,7 @@ var FormList = function FormList(props, ref) {
68
68
  var handleDragEnd = function handleDragEnd(drag) {
69
69
  var active = drag.active,
70
70
  over = drag.over;
71
- if (active.id !== over.id) {
71
+ if (_fields.length > 1 && active.id !== over.id) {
72
72
  var activeIndex = _fields.findIndex(function (item) {
73
73
  return item.key === active.id;
74
74
  });