zy-react-library 1.0.135 → 1.0.136

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: FormOption[] | ((field: FormListFieldData) => FormOption[]);
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, name }) => {
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={name || option.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, name }) => {
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={name || option.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)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zy-react-library",
3
3
  "private": false,
4
- "version": "1.0.135",
4
+ "version": "1.0.136",
5
5
  "type": "module",
6
6
  "description": "",
7
7
  "author": "LiuJiaNan",