lu-lowcode-package-form 0.9.83 → 0.9.85
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.
@@ -33,6 +33,7 @@ const UploadImage = ({ maxCount, value, multiple, onChange, ...props }) => {
|
|
33
33
|
}, [value]);
|
34
34
|
maxCount = maxCount || 99;
|
35
35
|
multiple = multiple || true;
|
36
|
+
console.log("maxCount",maxCount)
|
36
37
|
const [fileList, setFileList] = React.useState([]);
|
37
38
|
const [previewImage, setPreviewImage] = useState('');
|
38
39
|
const [previewImageIndex, setPreviewImageIndex] = useState(0);
|
@@ -147,7 +148,6 @@ const UploadImage = ({ maxCount, value, multiple, onChange, ...props }) => {
|
|
147
148
|
}
|
148
149
|
listType="picture-card"
|
149
150
|
fileList={fileList}
|
150
|
-
maxCount={maxCount}
|
151
151
|
multiple={multiple}
|
152
152
|
onPreview={handlePreview}
|
153
153
|
onChange={handleChange}
|
@@ -164,7 +164,7 @@ const FormContainer = forwardRef(({ cols = 1, children, mode = "view" }, ref) =>
|
|
164
164
|
let current_value = getParamValue("fieldsValue", current_identifier, fieldValues, null)
|
165
165
|
let changedFields = {}
|
166
166
|
|
167
|
-
let
|
167
|
+
let idGroups = []
|
168
168
|
for (let index = 0; index < fillRules.length; index++) {
|
169
169
|
const rule = fillRules[index];
|
170
170
|
let { source, target } = rule
|
@@ -174,7 +174,7 @@ const FormContainer = forwardRef(({ cols = 1, children, mode = "view" }, ref) =>
|
|
174
174
|
if (rule?.type == 1) {
|
175
175
|
if (dependencyMap.current.has(target)) {
|
176
176
|
let tableChildren = dependencyMap.current.get(target)?.component?.props?.children
|
177
|
-
if (Array.isArray(tableChildren) && tableChildren.length > 0)
|
177
|
+
if (Array.isArray(tableChildren) && tableChildren.length > 0) idGroups.push(tableChildren.map(item => `${source}.${item?.props?.componentId || item?.props?.__id}`))
|
178
178
|
|
179
179
|
}
|
180
180
|
if (source_value && typeof source_value == "string") {
|
@@ -219,9 +219,11 @@ const FormContainer = forwardRef(({ cols = 1, children, mode = "view" }, ref) =>
|
|
219
219
|
setTimeout(() => {
|
220
220
|
form.setFieldValue(target, setValue)
|
221
221
|
handleFieldsWith(target, form.getFieldsValue())
|
222
|
-
// if (
|
222
|
+
// if (idGroups.length > 0) handleTableAddRow(idGroups)
|
223
223
|
}, 0);
|
224
|
-
|
224
|
+
|
225
|
+
|
226
|
+
// if (idGroups.length > 0) setTimeout(() => handleTableAddRow(idGroups), 0)
|
225
227
|
}
|
226
228
|
|
227
229
|
setTimeout(() => {
|
@@ -232,10 +234,8 @@ const FormContainer = forwardRef(({ cols = 1, children, mode = "view" }, ref) =>
|
|
232
234
|
})
|
233
235
|
debounceHandleFieldsChange();
|
234
236
|
}
|
235
|
-
|
236
|
-
|
237
|
-
if (ids.length > 0) handleTableAddRow(ids)
|
238
|
-
}, 300)
|
237
|
+
if (idGroups.length > 0) idGroups.forEach(ids => handleTableAddRow(ids))
|
238
|
+
}, 200)
|
239
239
|
|
240
240
|
}
|
241
241
|
// 处理级联显示隐藏 @return {boolean} 是否需要重新渲染表单的字段
|