@zat-design/sisyphus-react 3.4.9 → 3.4.10-beta.10
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.css +66 -52
- package/dist/less.esm.css +66 -52
- package/es/ProEditTable/components/DndWrapper/index.d.ts +1 -0
- package/es/ProEditTable/components/DndWrapper/index.js +4 -3
- package/es/ProEditTable/components/RenderField/index.js +20 -1
- package/es/ProEditTable/index.js +49 -56
- package/es/ProEditTable/propsType.d.ts +7 -2
- package/es/ProEditTable/style/index.less +10 -0
- package/es/ProEditTable/utils/index.js +1 -0
- package/es/ProEnum/components/Group.d.ts +1 -0
- package/es/ProEnum/index.js +11 -5
- package/es/ProEnum/style/index.less +2 -2
- package/es/ProForm/components/base/InputNumber/index.js +41 -24
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +83 -37
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +72 -26
- package/es/ProForm/components/combination/FormList/propsType.d.ts +4 -4
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +8 -0
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.js +18 -0
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.less +10 -0
- package/es/ProForm/components/combination/Group/component/ComRender.d.ts +2 -0
- package/es/ProForm/components/combination/Group/component/ComRender.js +29 -13
- package/es/ProForm/components/combination/Group/index.d.ts +2 -2
- package/es/ProForm/components/combination/Group/index.js +7 -7
- package/es/ProForm/components/combination/Group/style/index.less +1 -1
- package/es/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/es/ProForm/components/combination/Group/utils.js +23 -4
- package/es/ProForm/components/combination/ProCascader/index.js +2 -2
- package/es/ProForm/components/combination/ProCascader/utils/index.js +8 -3
- package/es/ProForm/components/combination/ProModalSelect/index.js +1 -1
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProRangeLimit/index.js +10 -5
- package/es/ProForm/components/render/RenderFields.js +4 -1
- package/es/ProForm/utils/useDeepCompareMemo.d.ts +1 -1
- package/es/ProForm/utils/useDeepCompareMemo.js +2 -1
- package/es/ProForm/utils/useForm.js +10 -1
- package/es/ProLayout/components/ProCollapse/style/index.less +5 -2
- package/es/ProLayout/style/index.less +1 -1
- package/es/ProSelect/index.js +6 -3
- package/es/ProSelect/utils/index.d.ts +2 -1
- package/es/ProSelect/utils/index.js +9 -6
- package/es/ProTree/components/ProTree.js +18 -10
- package/es/ProTree/components/ProTreeSelect/index.js +2 -2
- package/es/ProTree/components/Tree.js +15 -7
- package/es/ProTree/index.js +2 -1
- package/es/ProTree/propsType.d.ts +5 -0
- package/es/ProUpload/components/ButtonRender.d.ts +1 -0
- package/es/ProUpload/components/ButtonRender.js +3 -1
- package/es/ProUpload/components/FileItem.d.ts +1 -0
- package/es/ProUpload/components/FileItem.js +21 -3
- package/es/ProUpload/index.js +4 -2
- package/es/ProUpload/propsType.d.ts +5 -0
- package/es/ProUpload/style/index.less +101 -111
- package/lib/ProEditTable/components/DndWrapper/index.d.ts +1 -0
- package/lib/ProEditTable/components/DndWrapper/index.js +4 -3
- package/lib/ProEditTable/components/RenderField/index.js +20 -1
- package/lib/ProEditTable/index.js +48 -55
- package/lib/ProEditTable/propsType.d.ts +7 -2
- package/lib/ProEditTable/style/index.less +10 -0
- package/lib/ProEditTable/utils/index.js +1 -0
- package/lib/ProEnum/components/Group.d.ts +1 -0
- package/lib/ProEnum/index.js +11 -5
- package/lib/ProEnum/style/index.less +2 -2
- package/lib/ProForm/components/base/InputNumber/index.js +40 -23
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +83 -37
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +72 -26
- package/lib/ProForm/components/combination/FormList/propsType.d.ts +4 -4
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +8 -0
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +24 -0
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.less +10 -0
- package/lib/ProForm/components/combination/Group/component/ComRender.d.ts +2 -0
- package/lib/ProForm/components/combination/Group/component/ComRender.js +31 -15
- package/lib/ProForm/components/combination/Group/index.d.ts +2 -2
- package/lib/ProForm/components/combination/Group/index.js +6 -6
- package/lib/ProForm/components/combination/Group/style/index.less +1 -1
- package/lib/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/lib/ProForm/components/combination/Group/utils.js +24 -5
- package/lib/ProForm/components/combination/ProCascader/index.js +1 -1
- package/lib/ProForm/components/combination/ProCascader/utils/index.js +8 -3
- package/lib/ProForm/components/combination/ProModalSelect/index.js +1 -1
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +10 -5
- package/lib/ProForm/components/render/RenderFields.js +4 -1
- package/lib/ProForm/utils/useDeepCompareMemo.d.ts +1 -1
- package/lib/ProForm/utils/useDeepCompareMemo.js +2 -1
- package/lib/ProForm/utils/useForm.js +10 -1
- package/lib/ProLayout/components/ProCollapse/style/index.less +5 -2
- package/lib/ProLayout/style/index.less +1 -1
- package/lib/ProSelect/index.js +6 -3
- package/lib/ProSelect/utils/index.d.ts +2 -1
- package/lib/ProSelect/utils/index.js +9 -6
- package/lib/ProTree/components/ProTree.js +17 -9
- package/lib/ProTree/components/ProTreeSelect/index.js +2 -2
- package/lib/ProTree/components/Tree.js +15 -7
- package/lib/ProTree/index.js +2 -1
- package/lib/ProTree/propsType.d.ts +5 -0
- package/lib/ProUpload/components/ButtonRender.d.ts +1 -0
- package/lib/ProUpload/components/ButtonRender.js +3 -1
- package/lib/ProUpload/components/FileItem.d.ts +1 -0
- package/lib/ProUpload/components/FileItem.js +19 -3
- package/lib/ProUpload/index.js +4 -2
- package/lib/ProUpload/propsType.d.ts +5 -0
- package/lib/ProUpload/style/index.less +101 -111
- package/package.json +2 -2
- package/es/ProForm/components/combination/_Group/index.d.ts +0 -4
- package/es/ProForm/components/combination/_Group/index.js +0 -109
- package/es/ProForm/components/combination/_Group/propsType.d.ts +0 -35
- package/es/ProForm/components/combination/_Group/propsType.js +0 -1
- package/es/ProForm/components/combination/_Group/style/index.less +0 -131
- package/es/ProForm/components/combination/_Group/utils.d.ts +0 -10
- package/es/ProForm/components/combination/_Group/utils.js +0 -46
- package/lib/ProForm/components/combination/_Group/index.d.ts +0 -4
- package/lib/ProForm/components/combination/_Group/index.js +0 -113
- package/lib/ProForm/components/combination/_Group/propsType.d.ts +0 -35
- package/lib/ProForm/components/combination/_Group/propsType.js +0 -5
- package/lib/ProForm/components/combination/_Group/style/index.less +0 -131
- package/lib/ProForm/components/combination/_Group/utils.d.ts +0 -10
- package/lib/ProForm/components/combination/_Group/utils.js +0 -53
package/es/ProUpload/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import _message from "antd/es/message";
|
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
|
-
var _excluded = ["value", "size", "action", "maxCount", "headerRender", "footerRender", "disabled", "uploadType", "buttonProps", "accept", "extraTipText", "beforeUpload", "onChange", "onDownload", "onPreview", "onRemove", "filterOriginFileObj", "method", "className", "dataParams", "name", "showExampleContent", "showUploadList", "otherProps", "transformResponse", "exampleTitle", "exampleContent", "exampleModalProps", "buttonText", "afterRender", "fieldNames"];
|
|
6
|
+
var _excluded = ["value", "size", "action", "maxCount", "headerRender", "footerRender", "disabled", "uploadType", "buttonProps", "accept", "extraTipText", "beforeUpload", "onChange", "onDownload", "onPreview", "onRemove", "filterOriginFileObj", "method", "className", "dataParams", "name", "showExampleContent", "showUploadList", "otherProps", "transformResponse", "exampleTitle", "exampleContent", "exampleModalProps", "buttonText", "afterRender", "fieldNames", "isConfirmDelete"];
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
/*
|
|
9
9
|
* @Author: wangshengqiang
|
|
@@ -68,6 +68,7 @@ var ProUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
68
68
|
buttonText = props.buttonText,
|
|
69
69
|
afterRender = props.afterRender,
|
|
70
70
|
fieldNames = props.fieldNames,
|
|
71
|
+
isConfirmDelete = props.isConfirmDelete,
|
|
71
72
|
residueProps = _objectWithoutProperties(props, _excluded);
|
|
72
73
|
var isView = otherProps === null || otherProps === void 0 ? void 0 : otherProps.isView;
|
|
73
74
|
var sensor = useSensor(PointerSensor, {
|
|
@@ -263,7 +264,8 @@ var ProUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
263
264
|
disabled: disabled || isView,
|
|
264
265
|
buttonText: buttonText,
|
|
265
266
|
extraTipText: extraTipText,
|
|
266
|
-
afterRender: afterRender
|
|
267
|
+
afterRender: afterRender,
|
|
268
|
+
isConfirmDelete: isConfirmDelete
|
|
267
269
|
};
|
|
268
270
|
useEffect(function () {
|
|
269
271
|
if (fieldNames && value.length > 0) {
|
|
@@ -184,6 +184,11 @@ export interface ProUploadProps {
|
|
|
184
184
|
* @default true
|
|
185
185
|
*/
|
|
186
186
|
fieldNames?: fieldNamesProps;
|
|
187
|
+
/**
|
|
188
|
+
* @description 删除已经上传的文件时是否二次提示
|
|
189
|
+
* @default false
|
|
190
|
+
*/
|
|
191
|
+
isConfirmDelete?: boolean;
|
|
187
192
|
}
|
|
188
193
|
export interface DraggableUploadListItemProps {
|
|
189
194
|
file: UploadFile<any>;
|
|
@@ -7,70 +7,67 @@
|
|
|
7
7
|
// 拖拽上传
|
|
8
8
|
.pro-upload-dragger {
|
|
9
9
|
.pro-upload-handle-box {
|
|
10
|
-
|
|
10
|
+
padding: var(--zaui-space-size-sm, 8px);
|
|
11
|
+
background: #f8f9fa;
|
|
11
12
|
border-radius: var(--zaui-border-radius, 8px);
|
|
12
|
-
padding : var(--zaui-space-size-sm, 8px);
|
|
13
13
|
|
|
14
14
|
.@{ant-prefix}-upload.@{ant-prefix}-upload-drag {
|
|
15
15
|
background-color: var(--zaui-base-bg, #fff);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.drag-upload-inner {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
display : flex;
|
|
22
|
-
align-items : center;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
23
21
|
justify-content: center;
|
|
22
|
+
min-width: 392px;
|
|
23
|
+
height: 110px;
|
|
24
24
|
|
|
25
25
|
.upload-dragger-control {
|
|
26
26
|
background-color: var(--zaui-base-bg, #fff);
|
|
27
27
|
|
|
28
28
|
.dragger-txt-line1 {
|
|
29
|
-
display
|
|
30
|
-
line-height: 26px;
|
|
29
|
+
display: flex;
|
|
31
30
|
align-items: center;
|
|
31
|
+
line-height: 26px;
|
|
32
32
|
|
|
33
33
|
.icon-upload {
|
|
34
|
-
display
|
|
34
|
+
display: inline-block;
|
|
35
|
+
color: #c5c7cd;
|
|
35
36
|
font-size: 30px;
|
|
36
|
-
color : #C5C7CD;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.dragger-txt {
|
|
40
40
|
margin-left: 9px;
|
|
41
|
-
font-size : var(--zaui-font-size, 14px);
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
color: rgba(0, 0, 0, 0.85);
|
|
43
|
+
font-size: var(--zaui-font-size, 14px);
|
|
45
44
|
line-height: 20px;
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
.click-txt {
|
|
49
|
-
color: var(--zaui-brand, #
|
|
48
|
+
color: var(--zaui-brand, #006aff);
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
.file-ext {
|
|
54
|
-
text-align: center;
|
|
55
53
|
margin-top: 10px;
|
|
56
|
-
font-size : var(--zaui-font-size-sm, 12px);
|
|
57
54
|
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
color: #939599;
|
|
56
|
+
font-size: var(--zaui-font-size-sm, 12px);
|
|
60
57
|
line-height: 14px;
|
|
61
|
-
|
|
58
|
+
text-align: center;
|
|
62
59
|
}
|
|
63
60
|
}
|
|
64
61
|
|
|
65
62
|
// 单个文件展示样式
|
|
66
63
|
.dragger-single-file {
|
|
67
|
-
display
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
68
66
|
justify-content: center;
|
|
69
|
-
|
|
70
|
-
padding : 0 var(--zaui-space-size-lg, 32px);
|
|
67
|
+
padding: 0 var(--zaui-space-size-lg, 32px);
|
|
71
68
|
|
|
72
69
|
.file-type-icon {
|
|
73
|
-
width
|
|
70
|
+
width: 18px;
|
|
74
71
|
height: 22px;
|
|
75
72
|
margin: 0 auto;
|
|
76
73
|
}
|
|
@@ -79,21 +76,20 @@
|
|
|
79
76
|
padding: 0 var(--zaui-space-size-lg, 32px);
|
|
80
77
|
}
|
|
81
78
|
|
|
82
|
-
|
|
83
79
|
.file-info-box {
|
|
80
|
+
display: flex;
|
|
84
81
|
margin-top: 11px;
|
|
85
|
-
display : flex;
|
|
86
82
|
|
|
87
83
|
&.file-box-error {
|
|
88
84
|
color: var(--zaui-danger);
|
|
89
85
|
}
|
|
90
86
|
|
|
91
87
|
.file-name {
|
|
92
|
-
display
|
|
93
|
-
overflow
|
|
88
|
+
display: box;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
word-break: break-all;
|
|
94
91
|
line-clamp: 1;
|
|
95
92
|
box-orient: vertical;
|
|
96
|
-
word-break: break-all;
|
|
97
93
|
}
|
|
98
94
|
|
|
99
95
|
.file-ext {
|
|
@@ -104,148 +100,143 @@
|
|
|
104
100
|
word-break: keep-all;
|
|
105
101
|
}
|
|
106
102
|
|
|
107
|
-
|
|
108
103
|
.file-download {
|
|
109
104
|
margin-left: var(--zaui-space-size-sm, 8px);
|
|
110
105
|
}
|
|
111
106
|
}
|
|
112
107
|
|
|
113
108
|
.file-action-box {
|
|
114
|
-
display
|
|
109
|
+
display: flex;
|
|
115
110
|
justify-content: center;
|
|
116
|
-
margin-top
|
|
117
|
-
|
|
111
|
+
margin-top: 3px;
|
|
112
|
+
color: #1890ff;
|
|
113
|
+
& > div {
|
|
114
|
+
cursor: pointer;
|
|
115
|
+
}
|
|
118
116
|
.file-del {
|
|
119
|
-
margin-left: 30px
|
|
117
|
+
margin-left: 30px;
|
|
120
118
|
}
|
|
121
119
|
}
|
|
122
120
|
}
|
|
123
|
-
|
|
124
121
|
}
|
|
125
122
|
}
|
|
126
|
-
|
|
127
123
|
}
|
|
128
124
|
|
|
129
125
|
// 按钮上传
|
|
130
126
|
.pro-upload-button {
|
|
131
127
|
display: flex;
|
|
132
128
|
|
|
133
|
-
>span {
|
|
134
|
-
width : 100%;
|
|
129
|
+
> span {
|
|
135
130
|
display: block;
|
|
131
|
+
width: 100%;
|
|
136
132
|
}
|
|
137
133
|
|
|
138
134
|
.pro-upload-button-inner {
|
|
139
135
|
display: flex;
|
|
140
136
|
|
|
141
137
|
.pro-upload-button-inner-right {
|
|
142
|
-
line-height: 32px;
|
|
143
138
|
margin-left: 10px;
|
|
139
|
+
line-height: 32px;
|
|
144
140
|
}
|
|
145
141
|
}
|
|
146
142
|
|
|
147
143
|
.upload-tip-txt {
|
|
148
144
|
margin-left: 10px;
|
|
149
|
-
line-height: 32px;
|
|
150
|
-
font-size : var(--zaui-font-size-sm, 12px);
|
|
151
|
-
|
|
152
145
|
|
|
153
146
|
color: #939599;
|
|
147
|
+
font-size: var(--zaui-font-size-sm, 12px);
|
|
148
|
+
line-height: 32px;
|
|
154
149
|
}
|
|
155
150
|
}
|
|
156
151
|
|
|
157
|
-
|
|
158
152
|
// 图片
|
|
159
153
|
.pro-upload-image {
|
|
160
|
-
|
|
161
154
|
position: relative;
|
|
162
|
-
display
|
|
155
|
+
display: inline-flex;
|
|
163
156
|
|
|
164
157
|
.@{ant-prefix}-upload-list-picture-card-container,
|
|
165
158
|
.@{ant-prefix}-upload-select-picture-card {
|
|
166
|
-
width
|
|
159
|
+
width: 126px;
|
|
167
160
|
height: 126px;
|
|
168
161
|
}
|
|
169
162
|
|
|
170
163
|
.image-example {
|
|
171
|
-
position
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
height
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
164
|
+
position: absolute;
|
|
165
|
+
top: 0;
|
|
166
|
+
right: -10px;
|
|
167
|
+
width: 88px;
|
|
168
|
+
height: 32px;
|
|
169
|
+
line-height: 32px;
|
|
170
|
+
text-align: center;
|
|
171
|
+
word-break: keep-all;
|
|
172
|
+
background: #ffffff;
|
|
173
|
+
border: 1px solid #dcdcdc;
|
|
181
174
|
border-radius: var(--zaui-border-radius, 8px);
|
|
182
|
-
|
|
183
|
-
|
|
175
|
+
transform: translate(100%, 0);
|
|
184
176
|
}
|
|
185
177
|
|
|
186
178
|
.file-item-image {
|
|
187
|
-
position
|
|
188
|
-
|
|
179
|
+
position: relative;
|
|
180
|
+
width: 126px;
|
|
189
181
|
// height : 100%;
|
|
190
|
-
height
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
border-radius
|
|
182
|
+
height: 126px;
|
|
183
|
+
overflow: hidden;
|
|
184
|
+
overflow: hidden;
|
|
185
|
+
border: 1px dashed #d9d9d9;
|
|
186
|
+
border-radius: 8px;
|
|
195
187
|
|
|
196
188
|
.file-type-icon-img {
|
|
197
|
-
position
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
189
|
+
position: absolute;
|
|
190
|
+
top: 50%;
|
|
191
|
+
left: 50%;
|
|
192
|
+
width: 30px;
|
|
201
193
|
transform: translate(-50%, -50%);
|
|
202
|
-
|
|
203
194
|
}
|
|
204
195
|
|
|
205
196
|
.image-con {
|
|
206
197
|
display: block;
|
|
207
|
-
width
|
|
208
|
-
height
|
|
198
|
+
width: 100%;
|
|
199
|
+
height: 100%;
|
|
209
200
|
}
|
|
210
201
|
|
|
211
202
|
&:hover .actions-wrap {
|
|
212
|
-
display
|
|
203
|
+
display: block;
|
|
213
204
|
background-color: rgba(0, 0, 0, 0.75);
|
|
214
205
|
}
|
|
215
206
|
|
|
216
207
|
.actions-wrap {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
bottom : 0;
|
|
208
|
+
position: absolute;
|
|
209
|
+
top: 0;
|
|
210
|
+
bottom: 0;
|
|
211
|
+
display: none;
|
|
212
|
+
width: 100%;
|
|
223
213
|
background-color: rgba(0, 0, 0, 0.5);
|
|
214
|
+
transition: all 2s;
|
|
224
215
|
|
|
225
216
|
.action-top {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
height : calc(100% - 36px);
|
|
217
|
+
display: flex;
|
|
218
|
+
flex: 1;
|
|
219
|
+
flex-direction: column;
|
|
220
|
+
align-items: center;
|
|
231
221
|
justify-content: center;
|
|
222
|
+
height: calc(100% - 36px);
|
|
232
223
|
}
|
|
233
224
|
|
|
234
225
|
.action-button {
|
|
235
|
-
height
|
|
226
|
+
height: 36px;
|
|
236
227
|
line-height: 36px;
|
|
237
|
-
|
|
238
|
-
|
|
228
|
+
text-align: center;
|
|
229
|
+
background: #ffffff;
|
|
239
230
|
}
|
|
240
231
|
|
|
241
232
|
.action-item {
|
|
242
|
-
color
|
|
233
|
+
color: #fff;
|
|
243
234
|
font-size: var(--zaui-font-size-sm, 12px);
|
|
244
|
-
opacity
|
|
235
|
+
opacity: 0.8;
|
|
245
236
|
|
|
246
237
|
.action-icon {
|
|
247
238
|
margin-right: 10px;
|
|
248
|
-
transform
|
|
239
|
+
transform: translate(0, 3px);
|
|
249
240
|
}
|
|
250
241
|
|
|
251
242
|
&:hover {
|
|
@@ -255,21 +246,21 @@
|
|
|
255
246
|
|
|
256
247
|
.action-button {
|
|
257
248
|
.action-item {
|
|
258
|
-
color: var(--zaui-danger, #
|
|
249
|
+
color: var(--zaui-danger, #ff005f);
|
|
259
250
|
}
|
|
260
251
|
}
|
|
261
252
|
}
|
|
262
253
|
}
|
|
263
254
|
|
|
264
255
|
.file-item-image.actions-wrap-error {
|
|
265
|
-
border: 1px solid #
|
|
256
|
+
border: 1px solid #ff005f;
|
|
266
257
|
}
|
|
267
258
|
|
|
268
259
|
.image-uploading {
|
|
269
|
-
|
|
270
|
-
display : flex;
|
|
260
|
+
display: flex;
|
|
271
261
|
align-items: center;
|
|
272
|
-
height
|
|
262
|
+
height: inherit;
|
|
263
|
+
padding: 20px;
|
|
273
264
|
}
|
|
274
265
|
}
|
|
275
266
|
|
|
@@ -289,38 +280,37 @@
|
|
|
289
280
|
}
|
|
290
281
|
|
|
291
282
|
.action-icon {
|
|
292
|
-
display
|
|
293
|
-
align-items
|
|
294
|
-
color
|
|
295
|
-
font-style
|
|
296
|
-
text-align
|
|
283
|
+
display: inline-flex;
|
|
284
|
+
align-items: center;
|
|
285
|
+
color: inherit;
|
|
286
|
+
font-style: normal;
|
|
287
|
+
text-align: center;
|
|
297
288
|
text-transform: none;
|
|
298
289
|
vertical-align: -0.15em;
|
|
299
290
|
text-rendering: optimizeLegibility;
|
|
300
291
|
|
|
301
292
|
span {
|
|
302
|
-
display
|
|
303
|
-
align-items
|
|
304
|
-
color
|
|
305
|
-
font-style
|
|
306
|
-
text-align
|
|
293
|
+
display: inline-flex;
|
|
294
|
+
align-items: center;
|
|
295
|
+
color: inherit;
|
|
296
|
+
font-style: normal;
|
|
297
|
+
text-align: center;
|
|
307
298
|
text-transform: none;
|
|
308
299
|
vertical-align: -0.15em;
|
|
309
300
|
text-rendering: optimizeLegibility;
|
|
310
301
|
}
|
|
311
|
-
|
|
312
302
|
}
|
|
313
303
|
}
|
|
314
304
|
}
|
|
315
305
|
|
|
316
306
|
.pro-upload-example {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
min-height : 200px;
|
|
320
|
-
overflow-y : auto;
|
|
321
|
-
display : flex;
|
|
322
|
-
align-items : center;
|
|
307
|
+
display: flex;
|
|
308
|
+
align-items: center;
|
|
323
309
|
justify-content: center;
|
|
310
|
+
width: 100%;
|
|
311
|
+
min-height: 200px;
|
|
312
|
+
max-height: 400px;
|
|
313
|
+
overflow-y: auto;
|
|
324
314
|
}
|
|
325
315
|
|
|
326
316
|
.proupload-modal-preview {
|
|
@@ -2,6 +2,7 @@ import React, { FC } from 'react';
|
|
|
2
2
|
interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
3
3
|
'data-row-key': string;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
isHideCheckBox?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare const Row: FC<RowProps>;
|
|
7
8
|
declare const DndWrapper: ({ draggable, value, onChange, disabled, children }: {
|
|
@@ -13,9 +13,10 @@ var _core = require("@dnd-kit/core");
|
|
|
13
13
|
var _sortable = require("@dnd-kit/sortable");
|
|
14
14
|
var _utilities = require("@dnd-kit/utilities");
|
|
15
15
|
var _ProIcon = _interopRequireDefault(require("../../../ProIcon"));
|
|
16
|
-
var _excluded = ["disabled", "children"];
|
|
16
|
+
var _excluded = ["disabled", "isHideCheckBox", "children"];
|
|
17
17
|
var Row = exports.Row = function Row(props) {
|
|
18
18
|
var disabled = props.disabled,
|
|
19
|
+
isHideCheckBox = props.isHideCheckBox,
|
|
19
20
|
children = props.children,
|
|
20
21
|
restProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
21
22
|
var data = (0, _sortable.useSortable)({
|
|
@@ -49,7 +50,7 @@ var Row = exports.Row = function Row(props) {
|
|
|
49
50
|
renderIndex = _ref.renderIndex;
|
|
50
51
|
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
51
52
|
children: (0, _jsxRuntime.jsxs)("span", {
|
|
52
|
-
className: "drag-wrapper",
|
|
53
|
+
className: "drag-wrapper".concat(isHideCheckBox ? ' no-check' : ''),
|
|
53
54
|
children: [(0, _jsxRuntime.jsx)(_ProIcon.default, (0, _objectSpread2.default)({
|
|
54
55
|
className: "drag-icon",
|
|
55
56
|
style: {
|
|
@@ -58,7 +59,7 @@ var Row = exports.Row = function Row(props) {
|
|
|
58
59
|
},
|
|
59
60
|
type: "drag",
|
|
60
61
|
size: 20
|
|
61
|
-
}, listeners)), render === null || render === void 0 ? void 0 : render(null, record, renderIndex)]
|
|
62
|
+
}, listeners)), isHideCheckBox ? null : render === null || render === void 0 ? void 0 : render(null, record, renderIndex)]
|
|
62
63
|
})
|
|
63
64
|
});
|
|
64
65
|
}
|
|
@@ -92,6 +92,10 @@ var RenderField = function RenderField(_ref) {
|
|
|
92
92
|
}
|
|
93
93
|
// type类型 首字母转大写
|
|
94
94
|
type = ((_type = type) === null || _type === void 0 ? void 0 : (_type$replace = _type.replace) === null || _type$replace === void 0 ? void 0 : _type$replace.call(_type, type[0], type[0].toUpperCase())) || 'Input';
|
|
95
|
+
// 自定义组件时 防止默认值影像后续判断
|
|
96
|
+
if ('component' in column) {
|
|
97
|
+
type = null;
|
|
98
|
+
}
|
|
95
99
|
// 单行正在编辑时,临时生成一套formItem用来存储中间值,点击取消时候重置回上一次状态
|
|
96
100
|
var namePath = (0, _tools.getNamePath)(name, virtualKey);
|
|
97
101
|
var rowData = form.getFieldValue([].concat((0, _toConsumableArray2.default)(namePath), [index])) || record || {};
|
|
@@ -525,7 +529,8 @@ var RenderField = function RenderField(_ref) {
|
|
|
525
529
|
delete _formItemProps.rules;
|
|
526
530
|
}
|
|
527
531
|
var _className = (0, _classnames.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, className, className), 'pro-form-item-changed', changed));
|
|
528
|
-
var FormItem =
|
|
532
|
+
var FormItem = null;
|
|
533
|
+
FormItem = TargetComponent ? (0, _jsxRuntime.jsx)(_antd.Form.Item, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
529
534
|
validateFirst: true
|
|
530
535
|
}, (0, _lodash.omit)(_formItemProps, ['render', 'cache', 'key', 'width', 'hiddenNames', 'name'])), {}, {
|
|
531
536
|
className: _className,
|
|
@@ -534,6 +539,20 @@ var RenderField = function RenderField(_ref) {
|
|
|
534
539
|
})) : (0, _jsxRuntime.jsx)(_Container.default, {
|
|
535
540
|
viewEmpty: viewEmpty
|
|
536
541
|
});
|
|
542
|
+
if (type === 'FormList') {
|
|
543
|
+
FormItem = (0, _jsxRuntime.jsx)(_antd.Form.List, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
544
|
+
name: formNamePath ? cellName.slice((formNamePath === null || formNamePath === void 0 ? void 0 : formNamePath.length) - 1) : cellName
|
|
545
|
+
}, (0, _lodash.omit)(_formItemProps, ['render', 'cache', 'key', 'width', 'hiddenNames', 'name'])), {}, {
|
|
546
|
+
children: function children(fields, operation, meta) {
|
|
547
|
+
return (0, _jsxRuntime.jsx)(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, componentProps), {}, {
|
|
548
|
+
otherProps: otherProps,
|
|
549
|
+
fields: fields,
|
|
550
|
+
operation: operation,
|
|
551
|
+
meta: meta
|
|
552
|
+
}));
|
|
553
|
+
}
|
|
554
|
+
}));
|
|
555
|
+
}
|
|
537
556
|
var originalTitle = originalDiffTip && originalValues ? (0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
538
557
|
children: ["\u521D\u59CB\u503C\uFF1A", /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? ( /*#__PURE__*/_react.default.cloneElement(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, componentProps), {}, {
|
|
539
558
|
isView: true,
|