@zzdadelu/schema-builder 1.0.0-alpha.121 → 1.0.0-alpha.122
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/main.js +7 -4
- package/lib/main.js +7 -4
- package/package.json +1 -1
package/es/main.js
CHANGED
|
@@ -38,15 +38,18 @@ var Design = function Design(props, ref) {
|
|
|
38
38
|
};
|
|
39
39
|
}, []);
|
|
40
40
|
var initIframe = function initIframe() {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
if (!containerRef.current) return;
|
|
42
|
+
var newIframe = createIframe();
|
|
43
|
+
iframeRef.current = newIframe; // 存入 ref
|
|
44
|
+
containerRef.current.innerHTML = ''; // 清空容器防止多次刷新重复注入
|
|
45
|
+
containerRef.current.appendChild(newIframe);
|
|
43
46
|
};
|
|
44
47
|
var engineOnLoad = function engineOnLoad(event) {
|
|
45
|
-
var _iframe
|
|
48
|
+
var _iframe$contentWindow, _iframe$contentWindow2;
|
|
46
49
|
if (event.data.type !== 'engine-load') {
|
|
47
50
|
return;
|
|
48
51
|
}
|
|
49
|
-
|
|
52
|
+
iframe === null || iframe === void 0 ? void 0 : (_iframe$contentWindow = iframe.contentWindow) === null || _iframe$contentWindow === void 0 ? void 0 : (_iframe$contentWindow2 = _iframe$contentWindow.__FR_ENGINE__) === null || _iframe$contentWindow2 === void 0 ? void 0 : _iframe$contentWindow2.init(_objectSpread({
|
|
50
53
|
settings: _objectSpread(_objectSpread({}, defaultSetting), settings),
|
|
51
54
|
widgets: widgets,
|
|
52
55
|
// recordEnable: true,
|
package/lib/main.js
CHANGED
|
@@ -46,15 +46,18 @@ var Design = function Design(props, ref) {
|
|
|
46
46
|
};
|
|
47
47
|
}, []);
|
|
48
48
|
var initIframe = function initIframe() {
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
if (!containerRef.current) return;
|
|
50
|
+
var newIframe = (0, _createIframe.default)();
|
|
51
|
+
iframeRef.current = newIframe; // 存入 ref
|
|
52
|
+
containerRef.current.innerHTML = ''; // 清空容器防止多次刷新重复注入
|
|
53
|
+
containerRef.current.appendChild(newIframe);
|
|
51
54
|
};
|
|
52
55
|
var engineOnLoad = function engineOnLoad(event) {
|
|
53
|
-
var _iframe
|
|
56
|
+
var _iframe$contentWindow, _iframe$contentWindow2;
|
|
54
57
|
if (event.data.type !== 'engine-load') {
|
|
55
58
|
return;
|
|
56
59
|
}
|
|
57
|
-
|
|
60
|
+
iframe === null || iframe === void 0 ? void 0 : (_iframe$contentWindow = iframe.contentWindow) === null || _iframe$contentWindow === void 0 ? void 0 : (_iframe$contentWindow2 = _iframe$contentWindow.__FR_ENGINE__) === null || _iframe$contentWindow2 === void 0 ? void 0 : _iframe$contentWindow2.init(_objectSpread({
|
|
58
61
|
settings: _objectSpread(_objectSpread({}, defaultSetting), settings),
|
|
59
62
|
widgets: widgets,
|
|
60
63
|
// recordEnable: true,
|