@byteluck-fe/model-driven-upgrade 4.36.0-lx2 → 4.36.0-lx3

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.
@@ -4,7 +4,7 @@
4
4
  * @Date: 2024-01-22 14:16:13
5
5
  * @LastEditors: SuperLuckyqi
6
6
  * @LastEditTime: 2024-04-20 23:27:19
7
- */ import { loop } from '@byteluck-fe/model-driven-shared';
7
+ */ import { loop, CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
8
8
  var dataCleaner = function(schemaItems, payload) {
9
9
  var isArray = Array.isArray(schemaItems);
10
10
  var schemaArray = isArray ? schemaItems : [
@@ -21,6 +21,37 @@ function convertLinkControlType(schema, payload) {
21
21
  if (!schema.props.caption_size) {
22
22
  schema.props.caption_size = '14';
23
23
  }
24
+ } else if (schema.type === CONTROL_TYPE.SUBTABLE) {
25
+ var _schema_props;
26
+ var headers = (_schema_props = schema.props) === null || _schema_props === void 0 ? void 0 : _schema_props.headers;
27
+ if (headers && headers.length > 0) {
28
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
29
+ try {
30
+ for(var _iterator = headers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
31
+ var header = _step.value;
32
+ var _header_children;
33
+ var control = (_header_children = header.children) === null || _header_children === void 0 ? void 0 : _header_children[0];
34
+ if (control.control_type === 'form') {
35
+ if (!control.props.caption_size) {
36
+ control.props.caption_size = '14';
37
+ }
38
+ }
39
+ }
40
+ } catch (err) {
41
+ _didIteratorError = true;
42
+ _iteratorError = err;
43
+ } finally{
44
+ try {
45
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
46
+ _iterator.return();
47
+ }
48
+ } finally{
49
+ if (_didIteratorError) {
50
+ throw _iteratorError;
51
+ }
52
+ }
53
+ }
54
+ }
24
55
  }
25
56
  return schema;
26
57
  }