@zhubangyun/lowcode-core 5.5.82 → 5.5.84

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.
@@ -3,15 +3,12 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import React, { useEffect, useState } from "react";
4
4
  import { PageLoading } from "../page-loading";
5
5
  import { loadPlugins } from "../../utils/common";
6
- var __hasLoading = false;
7
6
  export function LoadMaterials(props) {
8
7
  var _useState = useState(false),
9
8
  init = _useState[0],
10
9
  setInit = _useState[1];
11
10
  useEffect(function () {
12
- initialize()["finally"](function () {
13
- return setInit(true);
14
- });
11
+ initialize().then();
15
12
  }, []);
16
13
  function initialize() {
17
14
  return _initialize.apply(this, arguments);
@@ -21,9 +18,10 @@ export function LoadMaterials(props) {
21
18
  return _regeneratorRuntime.wrap(function _callee$(_context) {
22
19
  while (1) switch (_context.prev = _context.next) {
23
20
  case 0:
24
- __hasLoading = true;
25
- _context.next = 3;
21
+ _context.next = 2;
26
22
  return loadMaterials();
23
+ case 2:
24
+ setInit(true);
27
25
  case 3:
28
26
  case "end":
29
27
  return _context.stop();
@@ -32,9 +30,6 @@ export function LoadMaterials(props) {
32
30
  }));
33
31
  return _initialize.apply(this, arguments);
34
32
  }
35
- if (__hasLoading) {
36
- return props.children;
37
- }
38
33
  if (init) {
39
34
  return props.children;
40
35
  } else {
@@ -53,12 +48,18 @@ function _loadMaterials() {
53
48
  while (1) switch (_context2.prev = _context2.next) {
54
49
  case 0:
55
50
  components = {};
51
+ if (!window._components) {
52
+ _context2.next = 3;
53
+ break;
54
+ }
55
+ return _context2.abrupt("return");
56
+ case 3:
56
57
  urls = ["prop-types/15.8.1/prop-types.min.js", "lodash/4.6.1/lodash.min.js", "dayjs/dayjs.min.js", "antd/latest/reset.css", "antd/latest/antd.min.js", "antdIcon/1.0.0/antdIcon.min.js", "lowcode/core/index.js", "lowcode/core/index.css", "lowcode/materials/root/view.js", "lowcode/materials/root/view.css", "lowcode/materials/antd/view.js", "lowcode/materials/antd/view.css", "lowcode/materials/antd-pro/view.js", "lowcode/materials/antd-pro/view.css", "lowcode/icon-font/app/iconfont.js"];
57
- _context2.next = 4;
58
+ _context2.next = 6;
58
59
  return loadPlugins(urls.map(function (url) {
59
60
  return "https://cdn.zhiyunhe.com/plugin/" + url;
60
61
  }));
61
- case 4:
62
+ case 6:
62
63
  ["RootMaterial", "AntdMaterial", "AntdProMaterial"].forEach(function (lib) {
63
64
  var data = window[lib];
64
65
  if (data) {
@@ -70,9 +71,11 @@ function _loadMaterials() {
70
71
  });
71
72
  }
72
73
  });
73
- window._components = components;
74
- return _context2.abrupt("return", components);
75
- case 7:
74
+ Object.defineProperty(window, "_components", {
75
+ writable: false,
76
+ value: components
77
+ });
78
+ case 8:
76
79
  case "end":
77
80
  return _context2.stop();
78
81
  }
@@ -13,7 +13,7 @@ export var ReactRender = /*#__PURE__*/function (_PureComponent) {
13
13
  args[_key] = arguments[_key];
14
14
  }
15
15
  _this = _PureComponent.call.apply(_PureComponent, [this].concat(args)) || this;
16
- _this.key = Date.now().toString(36);
16
+ _this.key = Date.now().toString(36) + Math.random().toString(36);
17
17
  _this.node = void 0;
18
18
  return _this;
19
19
  }
@@ -21,7 +21,7 @@ export var ReactRender = /*#__PURE__*/function (_PureComponent) {
21
21
  var _proto = ReactRender.prototype;
22
22
  _proto.render = function render() {
23
23
  var _this2 = this;
24
- var components = this.props.components;
24
+ var components = this.props.components || window._components;
25
25
  // @ts-ignore
26
26
  return /*#__PURE__*/React.createElement(_ConfigProvider, {
27
27
  locale: zhCN
@@ -32,7 +32,7 @@ export var ReactRender = /*#__PURE__*/function (_PureComponent) {
32
32
  _this2.node = node === null || node === void 0 ? void 0 : node.__ref;
33
33
  },
34
34
  thisRequiredInJSE: true,
35
- components: components || window._components || {},
35
+ components: components,
36
36
  appHelper: {
37
37
  utils: utils,
38
38
  requestHandlersMap: {
@@ -1,33 +1,7 @@
1
- export declare function handleFormSchema(schema: any): void;
1
+ export declare function handleFormSchema(schema: any): Promise<void>;
2
2
  /**
3
3
  * 遍历schema
4
4
  * @param schema
5
5
  * @param callback 返回true 继续往下遍历
6
6
  */
7
- export declare function forEachFormSchema(schema: FormSchema, callback: (child: FormSchema, index: number, children: any[]) => boolean): void;
8
- export interface FormSchema {
9
- id?: string;
10
- state: any;
11
- methods: any;
12
- componentName: string;
13
- formId?: string;
14
- tableName?: string;
15
- schemaName?: string;
16
- columnName?: string;
17
- fdmSchema?: any;
18
- props: FormSchemaProps;
19
- children?: FormSchema[];
20
- }
21
- export interface FormSchemaProps {
22
- fieldId: string;
23
- label: string;
24
- fieldSchema?: any;
25
- columnName: string;
26
- array: boolean;
27
- layout?: "inline";
28
- fdmSchema?: any;
29
- associationForm: {
30
- id: string;
31
- fieldId: string;
32
- };
33
- }
7
+ export declare function forEachFormSchema(schema: any, callback: (child: any, index: number, children: any[]) => boolean): void;
@@ -1,54 +1,7 @@
1
- export function handleFormSchema(schema) {
2
- var fdmItems = [];
3
- var fieldIdMap = new Map();
4
- schema.state = schema.state || {};
5
- schema.methods = schema.methods || {};
6
- forEachFormSchema(schema, function (field) {
7
- if (field.fdmSchema) {
8
- var _field$fdmSchema, _field$fdmSchema2;
9
- fdmItems.push(field);
10
- field.fdmSchema.props = ((_field$fdmSchema = field.fdmSchema) === null || _field$fdmSchema === void 0 ? void 0 : _field$fdmSchema.props) || {};
11
- field.fdmSchema.props.style = ((_field$fdmSchema2 = field.fdmSchema) === null || _field$fdmSchema2 === void 0 ? void 0 : _field$fdmSchema2.props.style) || {};
12
- field.fdmSchema.props.style.height = "100%";
13
- // @ts-ignore
14
- field.fdmSchema.props.noContainer = true;
15
- }
16
- if (field.props.fieldId) {
17
- //删除children防止循环
18
- var copyField = JSON.parse(JSON.stringify(field));
19
- delete copyField.children;
20
- fieldIdMap.set(field.props.fieldId, copyField);
21
- }
22
- return true;
23
- });
24
- //处理查询列
25
- fdmItems.forEach(function (fdmField) {
26
- forEachFormSchema(fdmField.fdmSchema, function (field) {
27
- var _field$props;
28
- var findSchema = fieldIdMap.get((_field$props = field.props) === null || _field$props === void 0 ? void 0 : _field$props.fieldId);
29
- if (findSchema) {
30
- field.componentName = findSchema.componentName;
31
- field.props = Object.assign({}, JSON.parse(JSON.stringify(findSchema.props)), field.props);
32
- //处理子表查询
33
- if (findSchema.componentName == "SubFormField") {
34
- if (findSchema.fdmSchema) {
35
- var subFormFdmSchema = JSON.parse(JSON.stringify(findSchema.fdmSchema));
36
- forEachFormSchema(subFormFdmSchema, function (field) {
37
- if (field.componentName === "PageFdm") {
38
- field.props.layout = "inline";
39
- }
40
- return true;
41
- });
42
- // @ts-ignore
43
- field.props.fdmSchema = subFormFdmSchema;
44
- field.children = subFormFdmSchema.children[0].children;
45
- console.log(subFormFdmSchema);
46
- }
47
- }
48
- }
49
- return true;
50
- });
51
- });
1
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
+ export function handleFormSchema(_x) {
4
+ return _handleFormSchema.apply(this, arguments);
52
5
  }
53
6
 
54
7
  /**
@@ -56,6 +9,71 @@ export function handleFormSchema(schema) {
56
9
  * @param schema
57
10
  * @param callback 返回true 继续往下遍历
58
11
  */
12
+ function _handleFormSchema() {
13
+ _handleFormSchema = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(schema) {
14
+ var fdmItems, associationFields, fieldIdMap;
15
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
16
+ while (1) switch (_context.prev = _context.next) {
17
+ case 0:
18
+ fdmItems = [];
19
+ associationFields = [];
20
+ fieldIdMap = new Map();
21
+ schema.state = schema.state || {};
22
+ schema.methods = schema.methods || {};
23
+ forEachFormSchema(schema, function (field) {
24
+ if (field.fdmSchema) {
25
+ var _field$fdmSchema, _field$fdmSchema2;
26
+ fdmItems.push(field);
27
+ field.fdmSchema.props = ((_field$fdmSchema = field.fdmSchema) === null || _field$fdmSchema === void 0 ? void 0 : _field$fdmSchema.props) || {};
28
+ field.fdmSchema.props.style = ((_field$fdmSchema2 = field.fdmSchema) === null || _field$fdmSchema2 === void 0 ? void 0 : _field$fdmSchema2.props.style) || {};
29
+ field.fdmSchema.props.style.height = "100%";
30
+ }
31
+ if (field.props.fieldId) {
32
+ //删除children防止循环
33
+ var copyField = JSON.parse(JSON.stringify(field));
34
+ delete copyField.children;
35
+ fieldIdMap.set(field.props.fieldId, copyField);
36
+ }
37
+ if (field.componentName == "AssociationField") {
38
+ associationFields.push(field);
39
+ }
40
+ return true;
41
+ });
42
+ //处理查询列
43
+ fdmItems.forEach(function (fdmField) {
44
+ forEachFormSchema(fdmField.fdmSchema, function (field) {
45
+ var _field$props;
46
+ var findSchema = fieldIdMap.get((_field$props = field.props) === null || _field$props === void 0 ? void 0 : _field$props.fieldId);
47
+ if (findSchema) {
48
+ field.componentName = findSchema.componentName;
49
+ field.props = Object.assign({}, JSON.parse(JSON.stringify(findSchema.props)), field.props);
50
+ //处理子表查询
51
+ if (findSchema.componentName == "SubFormField") {
52
+ if (findSchema.fdmSchema) {
53
+ var subFormFdmSchema = JSON.parse(JSON.stringify(findSchema.fdmSchema));
54
+ forEachFormSchema(subFormFdmSchema, function (field) {
55
+ if (field.componentName === "PageFdm") {
56
+ field.props.layout = "inline";
57
+ }
58
+ return true;
59
+ });
60
+ // @ts-ignore
61
+ field.props.fdmSchema = subFormFdmSchema;
62
+ field.children = subFormFdmSchema.children[0].children;
63
+ }
64
+ }
65
+ }
66
+ return true;
67
+ });
68
+ });
69
+ case 7:
70
+ case "end":
71
+ return _context.stop();
72
+ }
73
+ }, _callee);
74
+ }));
75
+ return _handleFormSchema.apply(this, arguments);
76
+ }
59
77
  export function forEachFormSchema(schema, callback) {
60
78
  var _schema$children;
61
79
  schema === null || schema === void 0 ? void 0 : (_schema$children = schema.children) === null || _schema$children === void 0 ? void 0 : _schema$children.forEach(function (child, index, children) {
@@ -44,11 +44,15 @@ export function hideLoading() {
44
44
  }
45
45
  function _hideLoading() {
46
46
  _hideLoading = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
47
+ var loading;
47
48
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
48
49
  while (1) switch (_context2.prev = _context2.next) {
49
50
  case 0:
50
- debounceHide();
51
- case 1:
51
+ loading = document.getElementById("fullscreen-loading");
52
+ if (loading) {
53
+ loading.style.display = "none";
54
+ }
55
+ case 2:
52
56
  case "end":
53
57
  return _context2.stop();
54
58
  }
@@ -34,10 +34,7 @@ export function PageLoadSchema(props) {
34
34
  }, []);
35
35
  if (loading) {
36
36
  return /*#__PURE__*/React.createElement(PageLoading, {
37
- loading: true,
38
- style: {
39
- background: "white"
40
- }
37
+ loading: true
41
38
  });
42
39
  }
43
40
  if (!schema) {
@@ -10,15 +10,12 @@ var _pageLoading = require("../page-loading");
10
10
  var _common = require("../../utils/common");
11
11
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
12
12
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
13
- var __hasLoading = false;
14
13
  function LoadMaterials(props) {
15
14
  var _useState = (0, _react.useState)(false),
16
15
  init = _useState[0],
17
16
  setInit = _useState[1];
18
17
  (0, _react.useEffect)(function () {
19
- initialize()["finally"](function () {
20
- return setInit(true);
21
- });
18
+ initialize().then();
22
19
  }, []);
23
20
  function initialize() {
24
21
  return _initialize.apply(this, arguments);
@@ -28,9 +25,10 @@ function LoadMaterials(props) {
28
25
  return _regenerator["default"].wrap(function _callee$(_context) {
29
26
  while (1) switch (_context.prev = _context.next) {
30
27
  case 0:
31
- __hasLoading = true;
32
- _context.next = 3;
28
+ _context.next = 2;
33
29
  return loadMaterials();
30
+ case 2:
31
+ setInit(true);
34
32
  case 3:
35
33
  case "end":
36
34
  return _context.stop();
@@ -39,9 +37,6 @@ function LoadMaterials(props) {
39
37
  }));
40
38
  return _initialize.apply(this, arguments);
41
39
  }
42
- if (__hasLoading) {
43
- return props.children;
44
- }
45
40
  if (init) {
46
41
  return props.children;
47
42
  } else {
@@ -60,12 +55,18 @@ function _loadMaterials() {
60
55
  while (1) switch (_context2.prev = _context2.next) {
61
56
  case 0:
62
57
  components = {};
58
+ if (!window._components) {
59
+ _context2.next = 3;
60
+ break;
61
+ }
62
+ return _context2.abrupt("return");
63
+ case 3:
63
64
  urls = ["prop-types/15.8.1/prop-types.min.js", "lodash/4.6.1/lodash.min.js", "dayjs/dayjs.min.js", "antd/latest/reset.css", "antd/latest/antd.min.js", "antdIcon/1.0.0/antdIcon.min.js", "lowcode/core/index.js", "lowcode/core/index.css", "lowcode/materials/root/view.js", "lowcode/materials/root/view.css", "lowcode/materials/antd/view.js", "lowcode/materials/antd/view.css", "lowcode/materials/antd-pro/view.js", "lowcode/materials/antd-pro/view.css", "lowcode/icon-font/app/iconfont.js"];
64
- _context2.next = 4;
65
+ _context2.next = 6;
65
66
  return (0, _common.loadPlugins)(urls.map(function (url) {
66
67
  return "https://cdn.zhiyunhe.com/plugin/" + url;
67
68
  }));
68
- case 4:
69
+ case 6:
69
70
  ["RootMaterial", "AntdMaterial", "AntdProMaterial"].forEach(function (lib) {
70
71
  var data = window[lib];
71
72
  if (data) {
@@ -77,9 +78,11 @@ function _loadMaterials() {
77
78
  });
78
79
  }
79
80
  });
80
- window._components = components;
81
- return _context2.abrupt("return", components);
82
- case 7:
81
+ Object.defineProperty(window, "_components", {
82
+ writable: false,
83
+ value: components
84
+ });
85
+ case 8:
83
86
  case "end":
84
87
  return _context2.stop();
85
88
  }
@@ -18,7 +18,7 @@ var ReactRender = exports.ReactRender = /*#__PURE__*/function (_PureComponent) {
18
18
  args[_key] = arguments[_key];
19
19
  }
20
20
  _this = _PureComponent.call.apply(_PureComponent, [this].concat(args)) || this;
21
- _this.key = Date.now().toString(36);
21
+ _this.key = Date.now().toString(36) + Math.random().toString(36);
22
22
  _this.node = void 0;
23
23
  return _this;
24
24
  }
@@ -26,7 +26,7 @@ var ReactRender = exports.ReactRender = /*#__PURE__*/function (_PureComponent) {
26
26
  var _proto = ReactRender.prototype;
27
27
  _proto.render = function render() {
28
28
  var _this2 = this;
29
- var components = this.props.components;
29
+ var components = this.props.components || window._components;
30
30
  // @ts-ignore
31
31
  return /*#__PURE__*/React.createElement(_configProvider["default"], {
32
32
  locale: _zh_CN["default"]
@@ -37,7 +37,7 @@ var ReactRender = exports.ReactRender = /*#__PURE__*/function (_PureComponent) {
37
37
  _this2.node = node === null || node === void 0 ? void 0 : node.__ref;
38
38
  },
39
39
  thisRequiredInJSE: true,
40
- components: components || window._components || {},
40
+ components: components,
41
41
  appHelper: {
42
42
  utils: _utils["default"],
43
43
  requestHandlersMap: {
@@ -1,33 +1,7 @@
1
- export declare function handleFormSchema(schema: any): void;
1
+ export declare function handleFormSchema(schema: any): Promise<void>;
2
2
  /**
3
3
  * 遍历schema
4
4
  * @param schema
5
5
  * @param callback 返回true 继续往下遍历
6
6
  */
7
- export declare function forEachFormSchema(schema: FormSchema, callback: (child: FormSchema, index: number, children: any[]) => boolean): void;
8
- export interface FormSchema {
9
- id?: string;
10
- state: any;
11
- methods: any;
12
- componentName: string;
13
- formId?: string;
14
- tableName?: string;
15
- schemaName?: string;
16
- columnName?: string;
17
- fdmSchema?: any;
18
- props: FormSchemaProps;
19
- children?: FormSchema[];
20
- }
21
- export interface FormSchemaProps {
22
- fieldId: string;
23
- label: string;
24
- fieldSchema?: any;
25
- columnName: string;
26
- array: boolean;
27
- layout?: "inline";
28
- fdmSchema?: any;
29
- associationForm: {
30
- id: string;
31
- fieldId: string;
32
- };
33
- }
7
+ export declare function forEachFormSchema(schema: any, callback: (child: any, index: number, children: any[]) => boolean): void;
@@ -1,66 +1,84 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  exports.__esModule = true;
4
5
  exports.forEachFormSchema = forEachFormSchema;
5
6
  exports.handleFormSchema = handleFormSchema;
6
- function handleFormSchema(schema) {
7
- var fdmItems = [];
8
- var fieldIdMap = new Map();
9
- schema.state = schema.state || {};
10
- schema.methods = schema.methods || {};
11
- forEachFormSchema(schema, function (field) {
12
- if (field.fdmSchema) {
13
- var _field$fdmSchema, _field$fdmSchema2;
14
- fdmItems.push(field);
15
- field.fdmSchema.props = ((_field$fdmSchema = field.fdmSchema) === null || _field$fdmSchema === void 0 ? void 0 : _field$fdmSchema.props) || {};
16
- field.fdmSchema.props.style = ((_field$fdmSchema2 = field.fdmSchema) === null || _field$fdmSchema2 === void 0 ? void 0 : _field$fdmSchema2.props.style) || {};
17
- field.fdmSchema.props.style.height = "100%";
18
- // @ts-ignore
19
- field.fdmSchema.props.noContainer = true;
20
- }
21
- if (field.props.fieldId) {
22
- //删除children防止循环
23
- var copyField = JSON.parse(JSON.stringify(field));
24
- delete copyField.children;
25
- fieldIdMap.set(field.props.fieldId, copyField);
26
- }
27
- return true;
28
- });
29
- //处理查询列
30
- fdmItems.forEach(function (fdmField) {
31
- forEachFormSchema(fdmField.fdmSchema, function (field) {
32
- var _field$props;
33
- var findSchema = fieldIdMap.get((_field$props = field.props) === null || _field$props === void 0 ? void 0 : _field$props.fieldId);
34
- if (findSchema) {
35
- field.componentName = findSchema.componentName;
36
- field.props = Object.assign({}, JSON.parse(JSON.stringify(findSchema.props)), field.props);
37
- //处理子表查询
38
- if (findSchema.componentName == "SubFormField") {
39
- if (findSchema.fdmSchema) {
40
- var subFormFdmSchema = JSON.parse(JSON.stringify(findSchema.fdmSchema));
41
- forEachFormSchema(subFormFdmSchema, function (field) {
42
- if (field.componentName === "PageFdm") {
43
- field.props.layout = "inline";
44
- }
45
- return true;
46
- });
47
- // @ts-ignore
48
- field.props.fdmSchema = subFormFdmSchema;
49
- field.children = subFormFdmSchema.children[0].children;
50
- console.log(subFormFdmSchema);
51
- }
52
- }
53
- }
54
- return true;
55
- });
56
- });
7
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
8
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
9
+ function handleFormSchema(_x) {
10
+ return _handleFormSchema.apply(this, arguments);
57
11
  }
58
-
59
12
  /**
60
13
  * 遍历schema
61
14
  * @param schema
62
15
  * @param callback 返回true 继续往下遍历
63
16
  */
17
+ function _handleFormSchema() {
18
+ _handleFormSchema = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(schema) {
19
+ var fdmItems, associationFields, fieldIdMap;
20
+ return _regenerator["default"].wrap(function _callee$(_context) {
21
+ while (1) switch (_context.prev = _context.next) {
22
+ case 0:
23
+ fdmItems = [];
24
+ associationFields = [];
25
+ fieldIdMap = new Map();
26
+ schema.state = schema.state || {};
27
+ schema.methods = schema.methods || {};
28
+ forEachFormSchema(schema, function (field) {
29
+ if (field.fdmSchema) {
30
+ var _field$fdmSchema, _field$fdmSchema2;
31
+ fdmItems.push(field);
32
+ field.fdmSchema.props = ((_field$fdmSchema = field.fdmSchema) === null || _field$fdmSchema === void 0 ? void 0 : _field$fdmSchema.props) || {};
33
+ field.fdmSchema.props.style = ((_field$fdmSchema2 = field.fdmSchema) === null || _field$fdmSchema2 === void 0 ? void 0 : _field$fdmSchema2.props.style) || {};
34
+ field.fdmSchema.props.style.height = "100%";
35
+ }
36
+ if (field.props.fieldId) {
37
+ //删除children防止循环
38
+ var copyField = JSON.parse(JSON.stringify(field));
39
+ delete copyField.children;
40
+ fieldIdMap.set(field.props.fieldId, copyField);
41
+ }
42
+ if (field.componentName == "AssociationField") {
43
+ associationFields.push(field);
44
+ }
45
+ return true;
46
+ });
47
+ //处理查询列
48
+ fdmItems.forEach(function (fdmField) {
49
+ forEachFormSchema(fdmField.fdmSchema, function (field) {
50
+ var _field$props;
51
+ var findSchema = fieldIdMap.get((_field$props = field.props) === null || _field$props === void 0 ? void 0 : _field$props.fieldId);
52
+ if (findSchema) {
53
+ field.componentName = findSchema.componentName;
54
+ field.props = Object.assign({}, JSON.parse(JSON.stringify(findSchema.props)), field.props);
55
+ //处理子表查询
56
+ if (findSchema.componentName == "SubFormField") {
57
+ if (findSchema.fdmSchema) {
58
+ var subFormFdmSchema = JSON.parse(JSON.stringify(findSchema.fdmSchema));
59
+ forEachFormSchema(subFormFdmSchema, function (field) {
60
+ if (field.componentName === "PageFdm") {
61
+ field.props.layout = "inline";
62
+ }
63
+ return true;
64
+ });
65
+ // @ts-ignore
66
+ field.props.fdmSchema = subFormFdmSchema;
67
+ field.children = subFormFdmSchema.children[0].children;
68
+ }
69
+ }
70
+ }
71
+ return true;
72
+ });
73
+ });
74
+ case 7:
75
+ case "end":
76
+ return _context.stop();
77
+ }
78
+ }, _callee);
79
+ }));
80
+ return _handleFormSchema.apply(this, arguments);
81
+ }
64
82
  function forEachFormSchema(schema, callback) {
65
83
  var _schema$children;
66
84
  schema === null || schema === void 0 ? void 0 : (_schema$children = schema.children) === null || _schema$children === void 0 ? void 0 : _schema$children.forEach(function (child, index, children) {
@@ -54,11 +54,15 @@ function hideLoading() {
54
54
  }
55
55
  function _hideLoading() {
56
56
  _hideLoading = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
57
+ var loading;
57
58
  return _regenerator["default"].wrap(function _callee2$(_context2) {
58
59
  while (1) switch (_context2.prev = _context2.next) {
59
60
  case 0:
60
- debounceHide();
61
- case 1:
61
+ loading = document.getElementById("fullscreen-loading");
62
+ if (loading) {
63
+ loading.style.display = "none";
64
+ }
65
+ case 2:
62
66
  case "end":
63
67
  return _context2.stop();
64
68
  }
@@ -39,10 +39,7 @@ function PageLoadSchema(props) {
39
39
  }, []);
40
40
  if (loading) {
41
41
  return /*#__PURE__*/React.createElement(_pageLoading.PageLoading, {
42
- loading: true,
43
- style: {
44
- background: "white"
45
- }
42
+ loading: true
46
43
  });
47
44
  }
48
45
  if (!schema) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhubangyun/lowcode-core",
3
- "version": "5.5.082",
3
+ "version": "5.5.084",
4
4
  "description": "低代码核心",
5
5
  "files": [
6
6
  "lib",