zy-react-library 1.0.135 → 1.0.137
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.
|
@@ -52,7 +52,7 @@ export interface FormListUniqueProps {
|
|
|
52
52
|
/** 删除按钮的文本,默认 '删除' */
|
|
53
53
|
removeButtonText?: string;
|
|
54
54
|
/** 表单配置项 */
|
|
55
|
-
options:
|
|
55
|
+
options: (field: FormListFieldData) => FormOption[];
|
|
56
56
|
/** 点击新增按钮时的默认值 */
|
|
57
57
|
addDefaultValue?: FormValues;
|
|
58
58
|
/** 点击新增按钮时插入的索引位置 */
|
|
@@ -385,14 +385,14 @@ const FormItemsRenderer = ({
|
|
|
385
385
|
};
|
|
386
386
|
|
|
387
387
|
// 渲染普通表单项
|
|
388
|
-
const renderFormItem = ({ option, style, col, index
|
|
388
|
+
const renderFormItem = ({ option, style, col, index }) => {
|
|
389
389
|
if (getHidden(option.hidden))
|
|
390
390
|
return null;
|
|
391
391
|
|
|
392
392
|
return (
|
|
393
393
|
<Col key={getKey(option) || index} span={col.span} style={style}>
|
|
394
394
|
<Form.Item
|
|
395
|
-
name={
|
|
395
|
+
name={option.name}
|
|
396
396
|
label={renderLabel(option)}
|
|
397
397
|
rules={getRules(option)}
|
|
398
398
|
labelCol={col.labelCol}
|
|
@@ -407,7 +407,7 @@ const FormItemsRenderer = ({
|
|
|
407
407
|
};
|
|
408
408
|
|
|
409
409
|
// 渲染特殊类型的表单项
|
|
410
|
-
const renderOtherTypeItem = ({ option, style, col, index
|
|
410
|
+
const renderOtherTypeItem = ({ option, style, col, index }) => {
|
|
411
411
|
// 如果是 customizeRender 类型,完全交给外部控制渲染
|
|
412
412
|
if (option.customizeRender) {
|
|
413
413
|
return (
|
|
@@ -422,7 +422,7 @@ const FormItemsRenderer = ({
|
|
|
422
422
|
return (
|
|
423
423
|
<Form.Item
|
|
424
424
|
key={getKey(option) || index}
|
|
425
|
-
name={
|
|
425
|
+
name={option.name}
|
|
426
426
|
noStyle
|
|
427
427
|
preserve={false}
|
|
428
428
|
>
|
|
@@ -463,7 +463,6 @@ const FormItemsRenderer = ({
|
|
|
463
463
|
style,
|
|
464
464
|
col,
|
|
465
465
|
index: `${fieldIndex}_${listIndex}`,
|
|
466
|
-
name: [field.name, listOption.name],
|
|
467
466
|
};
|
|
468
467
|
const otherTypeItem = renderOtherTypeItem(params);
|
|
469
468
|
if (otherTypeItem)
|
|
@@ -43,7 +43,7 @@ function HiddenInfo(props) {
|
|
|
43
43
|
const [acceptImageFiles, setAcceptImageFiles] = useState([]);
|
|
44
44
|
const [inspectionAcceptImageFiles, setInspectionAcceptImageFiles] = useState([]);
|
|
45
45
|
const [loading, setLoading] = useState(true);
|
|
46
|
-
const [videoModalOpen, setVideoModalOpen] = useState(
|
|
46
|
+
const [videoModalOpen, setVideoModalOpen] = useState(false);
|
|
47
47
|
|
|
48
48
|
const { getFile } = useGetFile();
|
|
49
49
|
const query = useGetUrlQuery();
|