@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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/dist/SCM_Comps.js +1 -1
- package/dist/SCM_Comps.js.map +1 -1
- package/es/style.js +1 -0
- package/es/utils/props/form.js +15 -12
- package/lib/utils/props/form.js +15 -12
- package/package.json +3 -3
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';
|
package/es/utils/props/form.js
CHANGED
|
@@ -115,7 +115,7 @@ var processInitialValue = function processInitialValue(e) {
|
|
|
115
115
|
});
|
|
116
116
|
};
|
|
117
117
|
export var processFormProps = function processFormProps(props) {
|
|
118
|
-
var _ref3
|
|
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 (
|
|
193
|
-
var
|
|
194
|
-
(
|
|
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
|
};
|
package/lib/utils/props/form.js
CHANGED
|
@@ -119,7 +119,7 @@ var processInitialValue = function processInitialValue(e) {
|
|
|
119
119
|
});
|
|
120
120
|
};
|
|
121
121
|
var processFormProps = function processFormProps(props) {
|
|
122
|
-
var _ref3
|
|
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 (
|
|
197
|
-
var
|
|
198
|
-
(
|
|
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.
|
|
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.
|
|
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.
|
|
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"
|