@guo514360255/antd-lib 1.6.1 → 1.6.3

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.
@@ -86,7 +86,9 @@ var CustomForm = /*#__PURE__*/forwardRef(function (props, ref) {
86
86
  }, handleColumns(Array.isArray(formColumns) && formColumns.length ? formColumns.filter(function (item) {
87
87
  return !item.hideInForm;
88
88
  }) : columns || []).map(function (item) {
89
+ var _item$fieldProps;
89
90
  var defaultPlaceholder = getPlaceholder(item.type, item.title);
91
+ console.log(item);
90
92
  return item.type === 'list' ? /*#__PURE__*/React.createElement(Form.List, {
91
93
  name: item.dataIndex,
92
94
  key: item.dataIndex
@@ -109,8 +111,9 @@ var CustomForm = /*#__PURE__*/forwardRef(function (props, ref) {
109
111
  }, (formList[item.dataIndex] || []).filter(function (item) {
110
112
  return !item.hideInForm;
111
113
  }).map(function (list) {
114
+ var _list$fieldProps;
112
115
  var placeholder = getPlaceholder(list.type, list.title);
113
- return /*#__PURE__*/React.createElement(Form.Item, {
116
+ return /*#__PURE__*/React.createElement(Form.Item, _extends({
114
117
  name: [field.name, list.dataIndex],
115
118
  label: list.title,
116
119
  key: list.dataIndex,
@@ -119,7 +122,7 @@ var CustomForm = /*#__PURE__*/forwardRef(function (props, ref) {
119
122
  required: list.required,
120
123
  message: placeholder
121
124
  }].concat(_toConsumableArray(list.rules || []))
122
- }, list.type === 'upload' ? /*#__PURE__*/React.createElement(CustomUpload, list) : /*#__PURE__*/React.createElement(FormItem, _extends({}, list, {
125
+ }, ((_list$fieldProps = list.fieldProps) === null || _list$fieldProps === void 0 ? void 0 : _list$fieldProps.formItemProps) || {}), list.type === 'upload' ? /*#__PURE__*/React.createElement(CustomUpload, list) : /*#__PURE__*/React.createElement(FormItem, _extends({}, list, {
123
126
  defaultPlaceholder: placeholder
124
127
  })));
125
128
  })), /*#__PURE__*/React.createElement("span", {
@@ -138,7 +141,7 @@ var CustomForm = /*#__PURE__*/forwardRef(function (props, ref) {
138
141
  }, '新增' + item.title), /*#__PURE__*/React.createElement(Form.ErrorList, {
139
142
  errors: errors
140
143
  })));
141
- }) : /*#__PURE__*/React.createElement(Form.Item, {
144
+ }) : /*#__PURE__*/React.createElement(Form.Item, _extends({
142
145
  key: item.dataIndex,
143
146
  label: item.title ? "".concat(item.title) : '',
144
147
  name: item.dataIndex,
@@ -146,7 +149,7 @@ var CustomForm = /*#__PURE__*/forwardRef(function (props, ref) {
146
149
  required: item.required,
147
150
  message: defaultPlaceholder
148
151
  }].concat(_toConsumableArray(item.rules || []))
149
- }, item.type === 'upload' ?
152
+ }, ((_item$fieldProps = item.fieldProps) === null || _item$fieldProps === void 0 ? void 0 : _item$fieldProps.formItemProps) || {}), item.type === 'upload' ?
150
153
  /*#__PURE__*/
151
154
  // @ts-ignore
152
155
  React.createElement(CustomUpload, item) : /*#__PURE__*/React.createElement(FormItem, _extends({}, item, {
@@ -74,6 +74,13 @@ interface CustomColumnProps extends ProColumns {
74
74
  */
75
75
  isCustomUpload?: boolean;
76
76
 
77
+ /**
78
+ * 表单item参数
79
+ */
80
+ formItemProps?: {
81
+ [key: string]: any;
82
+ };
83
+
77
84
  [key: string]: any;
78
85
  };
79
86
 
@@ -6,6 +6,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
6
6
  * @Description:
7
7
  */
8
8
 
9
+ import cloneDeep from 'lodash/cloneDeep';
9
10
  import isEmpty from 'lodash/isEmpty';
10
11
  import isFinite from 'lodash/isFinite';
11
12
  import isNil from 'lodash/isNil';
@@ -116,7 +117,7 @@ export var handleColumnFieldProps = function handleColumnFieldProps(setColumns,
116
117
  if (column && column.fieldProps) {
117
118
  fn(column);
118
119
  }
119
- return s;
120
+ return cloneDeep(s);
120
121
  });
121
122
  };
122
123
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guo514360255/antd-lib",
3
- "version": "1.6.1",
3
+ "version": "1.6.3",
4
4
  "description": "react design 5 lib",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",