@zzdadelu/schema-builder 1.0.0-alpha.111 → 1.0.0-alpha.112

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.
Files changed (3) hide show
  1. package/es/main.js +13 -10
  2. package/lib/main.js +13 -10
  3. package/package.json +1 -1
package/es/main.js CHANGED
@@ -40,7 +40,7 @@ var Design = function Design(props, ref) {
40
40
  containerRef.current.appendChild(iframe);
41
41
  };
42
42
  var engineOnLoad = function engineOnLoad(event) {
43
- var _iframe3, _iframeWindow$__FR_EN;
43
+ var _iframe3;
44
44
  if (event.data.type !== 'engine-load') {
45
45
  return;
46
46
  }
@@ -53,16 +53,19 @@ var Design = function Design(props, ref) {
53
53
  return;
54
54
  }
55
55
  console.error('Iframe typeof iframeWindow.getFormRenderMaterial 1', _typeof(iframeWindow.getFormRenderMaterial));
56
+ setTimeout(function () {
57
+ var _iframe4, _iframe4$contentWindo, _iframe4$contentWindo2;
58
+ console.log('延迟结束,开始调用 __FR_ENGINE__?.init');
59
+ (_iframe4 = iframe) === null || _iframe4 === void 0 ? void 0 : (_iframe4$contentWindo = _iframe4.contentWindow) === null || _iframe4$contentWindo === void 0 ? void 0 : (_iframe4$contentWindo2 = _iframe4$contentWindo.__FR_ENGINE__) === null || _iframe4$contentWindo2 === void 0 ? void 0 : _iframe4$contentWindo2.init(_objectSpread({
60
+ settings: _objectSpread(_objectSpread({}, defaultSetting), settings),
61
+ widgets: widgets,
62
+ // recordEnable: true,
63
+ logo: {
64
+ title: 'XRender'
65
+ }
66
+ }, restProps));
67
+ }, 10000); // 200ms 是一个足够安全的时间
56
68
 
57
- // ✅ 环境就绪,执行引擎初始化
58
- (_iframeWindow$__FR_EN = iframeWindow.__FR_ENGINE__) === null || _iframeWindow$__FR_EN === void 0 ? void 0 : _iframeWindow$__FR_EN.init(_objectSpread({
59
- settings: _objectSpread(_objectSpread({}, defaultSetting), settings),
60
- widgets: widgets,
61
- // recordEnable: true,
62
- logo: {
63
- title: 'XRender'
64
- }
65
- }, restProps));
66
69
  console.error('Iframe typeof iframeWindow.getFormRenderMaterial 2', _typeof(iframeWindow.getFormRenderMaterial));
67
70
  };
68
71
  return /*#__PURE__*/React.createElement("div", {
package/lib/main.js CHANGED
@@ -48,7 +48,7 @@ var Design = function Design(props, ref) {
48
48
  containerRef.current.appendChild(iframe);
49
49
  };
50
50
  var engineOnLoad = function engineOnLoad(event) {
51
- var _iframe3, _iframeWindow$__FR_EN;
51
+ var _iframe3;
52
52
  if (event.data.type !== 'engine-load') {
53
53
  return;
54
54
  }
@@ -61,16 +61,19 @@ var Design = function Design(props, ref) {
61
61
  return;
62
62
  }
63
63
  console.error('Iframe typeof iframeWindow.getFormRenderMaterial 1', _typeof(iframeWindow.getFormRenderMaterial));
64
+ setTimeout(function () {
65
+ var _iframe4, _iframe4$contentWindo, _iframe4$contentWindo2;
66
+ console.log('延迟结束,开始调用 __FR_ENGINE__?.init');
67
+ (_iframe4 = iframe) === null || _iframe4 === void 0 ? void 0 : (_iframe4$contentWindo = _iframe4.contentWindow) === null || _iframe4$contentWindo === void 0 ? void 0 : (_iframe4$contentWindo2 = _iframe4$contentWindo.__FR_ENGINE__) === null || _iframe4$contentWindo2 === void 0 ? void 0 : _iframe4$contentWindo2.init(_objectSpread({
68
+ settings: _objectSpread(_objectSpread({}, defaultSetting), settings),
69
+ widgets: widgets,
70
+ // recordEnable: true,
71
+ logo: {
72
+ title: 'XRender'
73
+ }
74
+ }, restProps));
75
+ }, 10000); // 200ms 是一个足够安全的时间
64
76
 
65
- // ✅ 环境就绪,执行引擎初始化
66
- (_iframeWindow$__FR_EN = iframeWindow.__FR_ENGINE__) === null || _iframeWindow$__FR_EN === void 0 ? void 0 : _iframeWindow$__FR_EN.init(_objectSpread({
67
- settings: _objectSpread(_objectSpread({}, defaultSetting), settings),
68
- widgets: widgets,
69
- // recordEnable: true,
70
- logo: {
71
- title: 'XRender'
72
- }
73
- }, restProps));
74
77
  console.error('Iframe typeof iframeWindow.getFormRenderMaterial 2', _typeof(iframeWindow.getFormRenderMaterial));
75
78
  };
76
79
  return /*#__PURE__*/_react.default.createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zzdadelu/schema-builder",
3
- "version": "1.0.0-alpha.111",
3
+ "version": "1.0.0-alpha.112",
4
4
  "description": "通过 JSON Schema 生成标准 Form,常用于自定义搭建配置界面生成",
5
5
  "keywords": [
6
6
  "Form",