@ztocwst/rc-pro-materials 0.2.10 → 0.2.11

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/es/style.js CHANGED
@@ -11,6 +11,7 @@ import 'antd/lib/tabs/style';
11
11
  import 'antd/lib/checkbox/style';
12
12
  import 'antd/lib/radio/style';
13
13
  import 'antd/lib/spin/style';
14
+ import 'antd/lib/carousel/style';
14
15
  import 'antd/es/statistic/style';
15
16
  import 'antd/es/progress/style';
16
17
  import 'antd/es/table/style';
@@ -115,7 +115,7 @@ var processInitialValue = function processInitialValue(e) {
115
115
  });
116
116
  };
117
117
  export var processFormProps = function processFormProps(props) {
118
- var _ref3, _config$columns, _config$columns$filte, _Object$keys;
118
+ var _ref3;
119
119
  var columns = props.columns,
120
120
  submitter = props.submitter,
121
121
  labelColWidth = props.labelColWidth,
@@ -179,19 +179,22 @@ export var processFormProps = function processFormProps(props) {
179
179
  span: span,
180
180
  layoutType: layoutType
181
181
  }, restProps ? processJsonOrFunctionProps(restProps) : {}));
182
- var resetFields = config === null || config === void 0 ? void 0 : (_config$columns = config.columns) === null || _config$columns === void 0 ? void 0 : (_config$columns$filte = _config$columns.filter(function (e) {
183
- return !(e !== null && e !== void 0 && e.initialValue);
184
- })) === null || _config$columns$filte === void 0 ? void 0 : _config$columns$filte.reduce(function (prev, next) {
185
- var _next$dataIndex;
186
- // eslint-disable-next-line no-param-reassign
187
- prev[(_next$dataIndex = next === null || next === void 0 ? void 0 : next.dataIndex) !== null && _next$dataIndex !== void 0 ? _next$dataIndex : ''] = undefined;
188
- return prev;
189
- }, {});
190
182
 
191
183
  // 每次变更重置
192
- if ((_Object$keys = Object.keys(resetFields)) !== null && _Object$keys !== void 0 && _Object$keys.length) {
193
- var _formRef$current;
194
- (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.setFieldsValue(resetFields);
184
+ if (formRef !== null && formRef !== void 0 && formRef.current) {
185
+ var _config$columns, _config$columns$filte, _Object$keys;
186
+ var resetFields = config === null || config === void 0 ? void 0 : (_config$columns = config.columns) === null || _config$columns === void 0 ? void 0 : (_config$columns$filte = _config$columns.filter(function (e) {
187
+ return !(e !== null && e !== void 0 && e.initialValue);
188
+ })) === null || _config$columns$filte === void 0 ? void 0 : _config$columns$filte.reduce(function (prev, next) {
189
+ var _next$dataIndex;
190
+ // eslint-disable-next-line no-param-reassign
191
+ prev[(_next$dataIndex = next === null || next === void 0 ? void 0 : next.dataIndex) !== null && _next$dataIndex !== void 0 ? _next$dataIndex : ''] = undefined;
192
+ return prev;
193
+ }, {});
194
+ if ((_Object$keys = Object.keys(resetFields)) !== null && _Object$keys !== void 0 && _Object$keys.length) {
195
+ var _formRef$current;
196
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.setFieldsValue(resetFields);
197
+ }
195
198
  }
196
199
  return config;
197
200
  };
@@ -119,7 +119,7 @@ var processInitialValue = function processInitialValue(e) {
119
119
  });
120
120
  };
121
121
  var processFormProps = function processFormProps(props) {
122
- var _ref3, _config$columns, _config$columns$filte, _Object$keys;
122
+ var _ref3;
123
123
  var columns = props.columns,
124
124
  submitter = props.submitter,
125
125
  labelColWidth = props.labelColWidth,
@@ -183,19 +183,22 @@ var processFormProps = function processFormProps(props) {
183
183
  span: span,
184
184
  layoutType: layoutType
185
185
  }, restProps ? (0, _lib.processJsonOrFunctionProps)(restProps) : {}));
186
- var resetFields = config === null || config === void 0 ? void 0 : (_config$columns = config.columns) === null || _config$columns === void 0 ? void 0 : (_config$columns$filte = _config$columns.filter(function (e) {
187
- return !(e !== null && e !== void 0 && e.initialValue);
188
- })) === null || _config$columns$filte === void 0 ? void 0 : _config$columns$filte.reduce(function (prev, next) {
189
- var _next$dataIndex;
190
- // eslint-disable-next-line no-param-reassign
191
- prev[(_next$dataIndex = next === null || next === void 0 ? void 0 : next.dataIndex) !== null && _next$dataIndex !== void 0 ? _next$dataIndex : ''] = undefined;
192
- return prev;
193
- }, {});
194
186
 
195
187
  // 每次变更重置
196
- if ((_Object$keys = Object.keys(resetFields)) !== null && _Object$keys !== void 0 && _Object$keys.length) {
197
- var _formRef$current;
198
- (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.setFieldsValue(resetFields);
188
+ if (formRef !== null && formRef !== void 0 && formRef.current) {
189
+ var _config$columns, _config$columns$filte, _Object$keys;
190
+ var resetFields = config === null || config === void 0 ? void 0 : (_config$columns = config.columns) === null || _config$columns === void 0 ? void 0 : (_config$columns$filte = _config$columns.filter(function (e) {
191
+ return !(e !== null && e !== void 0 && e.initialValue);
192
+ })) === null || _config$columns$filte === void 0 ? void 0 : _config$columns$filte.reduce(function (prev, next) {
193
+ var _next$dataIndex;
194
+ // eslint-disable-next-line no-param-reassign
195
+ prev[(_next$dataIndex = next === null || next === void 0 ? void 0 : next.dataIndex) !== null && _next$dataIndex !== void 0 ? _next$dataIndex : ''] = undefined;
196
+ return prev;
197
+ }, {});
198
+ if ((_Object$keys = Object.keys(resetFields)) !== null && _Object$keys !== void 0 && _Object$keys.length) {
199
+ var _formRef$current;
200
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.setFieldsValue(resetFields);
201
+ }
199
202
  }
200
203
  return config;
201
204
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztocwst/rc-pro-materials",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "@ztocwst/rc-pro-materials",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -86,9 +86,9 @@
86
86
  },
87
87
  "componentConfig": {
88
88
  "isComponentLibrary": true,
89
- "materialSchema": "https://npm.onmicrosoft.cn/@ztocwst/rc-pro-materials@0.2.10/build/lowcode/assets-prod.json"
89
+ "materialSchema": "https://npm.onmicrosoft.cn/@ztocwst/rc-pro-materials@0.2.11/build/lowcode/assets-prod.json"
90
90
  },
91
- "homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.2.10/build/index.html",
91
+ "homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.2.11/build/index.html",
92
92
  "publishConfig": {
93
93
  "registry": "https://registry.npmjs.org/",
94
94
  "access": "public"