@zzdadelu/schema-builder 1.0.0-alpha.20 → 1.0.0-alpha.21
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/createIframe.js +1 -3
- package/lib/createIframe.js +1 -3
- package/package.json +1 -1
package/es/createIframe.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
var createIframeContent = function createIframeContent() {
|
|
2
|
-
//
|
|
3
|
-
var timestamp = Math.floor(Date.now() / 1000);
|
|
4
|
-
var html = "\n <html>\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\" />\n <title>XRender</title>\n <link rel=\"icon\" href=\"https://img.alicdn.com/tfs/TB17UtINiLaK1RjSZFxXXamPFXa-606-643.png\">\n <link href=\"https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/variables.css\" rel=\"stylesheet\" />\n <link href=\"https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/dist/next.var.min.css\" rel=\"stylesheet\" />\n <link rel=\"stylesheet\" href=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.2.3/dist/css/engine-core.css\" />\n <link rel=\"stylesheet\" href=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/css/engine-ext.css\" />\n <link rel=\"stylesheet\" href=\"https://g.alicdn.com/fone-lowcode/fr-generator/1.1.0/css/index.css\" />\n\n <script>\n window.React = window.parent.React;\n window.ReactDOM = window.parent.ReactDOM;\n </script>\n \n <script src=\"https://g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js?t=".concat(timestamp, "\"></script>\n <script src=\"https://g.alicdn.com/platform/c/react15-polyfill/0.0.1/dist/index.js?t=").concat(timestamp, "\"></script>\n <script src=\"https://g.alicdn.com/platform/c/lodash/4.6.1/lodash.min.js?t=").concat(timestamp, "\"></script>\n <script src=\"https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js?t=").concat(timestamp, "\"></script>\n <script src=\"https://g.alicdn.com/code/lib/alifd__next/1.23.24/next.min.js?t=").concat(timestamp, "\"></script>\n <script crossorigin=\"anonymous\" src=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.2.3/dist/js/engine-core.js?t=").concat(timestamp, "\"></script>\n <script crossorigin=\"anonymous\" src=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/js/engine-ext.js?t=").concat(timestamp, "\"></script>\n\n <body>\n <div id=\"lce-container\"></div>\n <script type=\"text/javascript\" src=\"https://g.alicdn.com/fone-lowcode/fr-generator/1.1.0/js/index.js?t=").concat(timestamp, "\"></script>\n </body>\n </html>\n ");
|
|
2
|
+
var html = "\n <html>\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\" />\n <title>XRender</title>\n <link rel=\"icon\" href=\"https://img.alicdn.com/tfs/TB17UtINiLaK1RjSZFxXXamPFXa-606-643.png\">\n <link href=\"https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/variables.css\" rel=\"stylesheet\" />\n <link href=\"https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/dist/next.var.min.css\" rel=\"stylesheet\" />\n <link rel=\"stylesheet\" href=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.2.3/dist/css/engine-core.css\" />\n <link rel=\"stylesheet\" href=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/css/engine-ext.css\" />\n <link rel=\"stylesheet\" href=\"https://g.alicdn.com/fone-lowcode/fr-generator/1.1.0/css/index.css\" />\n\n <script>\n // \u5171\u4EAB\u7236\u7A97\u53E3\u7684 React/ReactDOM\uFF08\u4FDD\u6301\u539F\u884C\u4E3A\uFF09\n window.React = window.parent.React;\n window.ReactDOM = window.parent.ReactDOM;\n\n // ---- \u5B89\u5168\u4EE3\u7406\uFF1A\u786E\u4FDD getFormRenderMaterial \u8C03\u7528\u4E0D\u4F1A\u76F4\u63A5\u629B\u5F02\u5E38 ----\n (function installGetFormRenderMaterialProxy() {\n if (window.__getFormRenderMaterial_installed) return;\n window.__getFormRenderMaterial_installed = true;\n window.__getFormRenderMaterial_queue = [];\n\n Object.defineProperty(window, 'getFormRenderMaterial', {\n configurable: true,\n enumerable: true,\n get: function() {\n if (window.__real_getFormRenderMaterial) return window.__real_getFormRenderMaterial;\n return function() {\n window.__getFormRenderMaterial_queue.push(Array.prototype.slice.call(arguments));\n };\n },\n set: function(val) {\n if (typeof val === 'function') {\n window.__real_getFormRenderMaterial = val;\n var q = window.__getFormRenderMaterial_queue.splice(0);\n q.forEach(function(args) {\n try { window.__real_getFormRenderMaterial.apply(null, args); } catch (e) {}\n });\n try {\n Object.defineProperty(window, 'getFormRenderMaterial', {\n value: window.__real_getFormRenderMaterial,\n writable: true,\n configurable: true\n });\n } catch (e) {}\n } else {\n console.warn('Ignored non-function assignment to window.getFormRenderMaterial:', val);\n }\n }\n });\n\n // \u5C1D\u8BD5\u4EE3\u7406\u7236\u7A97\u53E3\uFF08\u540C\u6E90\u60C5\u51B5\u4E0B\uFF09\n try {\n setTimeout(function tryProxyParent() {\n try {\n if (window.parent && window.parent !== window && typeof window.parent.getFormRenderMaterial === 'function') {\n window.getFormRenderMaterial = function() {\n return window.parent.getFormRenderMaterial.apply(window.parent, arguments);\n };\n }\n } catch (e) {}\n }, 0);\n } catch (e) {}\n })();\n\n // ---- \u987A\u5E8F\u52A0\u8F7D\u811A\u672C\u7684\u5E2E\u52A9\u51FD\u6570 ----\n function loadScriptsSequential(urls, cb) {\n var i = 0;\n function next() {\n if (i >= urls.length) { cb && cb(); return; }\n var url = urls[i++];\n try {\n if (url.indexOf('engine-core') !== -1 && window.AliLowCodeEngine) return next();\n if (url.indexOf('engine-ext') !== -1 && window.AliLowCodeEngineExt) return next();\n } catch (e) {}\n var s = document.createElement('script');\n s.src = url;\n s.crossOrigin = 'anonymous';\n s.onload = next;\n s.onerror = function() { next(); };\n document.head.appendChild(s);\n }\n next();\n }\n\n // ---- \u5F3A\u5236\u4ECE\u7F51\u7EDC\u62C9\u53D6\u811A\u672C\u5E76\u6CE8\u5165\uFF08fetch + blob\uFF09\uFF0C\u5931\u8D25\u65F6\u56DE\u9000\u5230\u5E26\u65F6\u95F4\u6233\u7684\u666E\u901A\u52A0\u8F7D ----\n function injectScriptFromNetwork(url, onload, onerror) {\n // \u4F7F\u7528 fetch \u5F3A\u5236\u4E0D\u8D70\u7F13\u5B58\uFF08no-store\uFF09\uFF0C\u9700\u8981 CDN \u652F\u6301 CORS\n try {\n fetch(url, { cache: 'no-store', mode: 'cors' })\n .then(function(resp) {\n if (!resp.ok) throw new Error('fetch failed ' + resp.status);\n return resp.text();\n })\n .then(function(code) {\n var blob = new Blob([code], { type: 'text/javascript' });\n var blobUrl = URL.createObjectURL(blob);\n var s = document.createElement('script');\n s.src = blobUrl;\n s.onload = function() {\n URL.revokeObjectURL(blobUrl);\n onload && onload();\n };\n s.onerror = function(e) {\n URL.revokeObjectURL(blobUrl);\n (onerror && onerror(e));\n };\n document.head.appendChild(s);\n })\n .catch(function(err) {\n // fetch \u5931\u8D25\uFF08\u53EF\u80FD CORS\uFF09\uFF0C\u56DE\u9000\u5230\u5E26\u65F6\u95F4\u6233\u7684\u666E\u901A\u811A\u672C\u52A0\u8F7D\n var fallback = url + '?t=' + Date.now();\n var s2 = document.createElement('script');\n s2.src = fallback;\n s2.crossOrigin = 'anonymous';\n s2.onload = function() { onload && onload(); };\n s2.onerror = function(e) { onerror && onerror(e); };\n document.head.appendChild(s2);\n });\n } catch (e) {\n // \u73AF\u5883\u4E0D\u652F\u6301 fetch\uFF0C\u76F4\u63A5\u56DE\u9000\u5230\u5E26\u65F6\u95F4\u6233\n var s3 = document.createElement('script');\n s3.src = url + '?t=' + Date.now();\n s3.crossOrigin = 'anonymous';\n s3.onload = function() { onload && onload(); };\n s3.onerror = function(e) { onerror && onerror(e); };\n document.head.appendChild(s3);\n }\n }\n </script>\n </head>\n <body>\n <div id=\"lce-container\"></div>\n\n <script>\n // \u5148\u987A\u5E8F\u52A0\u8F7D\u901A\u7528\u4F9D\u8D56\n loadScriptsSequential([\n \"https://g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js\",\n \"https://g.alicdn.com/platform/c/react15-polyfill/0.0.1/dist/index.js\",\n \"https://g.alicdn.com/platform/c/lodash/4.6.1/lodash.min.js\",\n \"https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js\",\n \"https://g.alicdn.com/code/lib/alifd__next/1.23.24/next.min.js\",\n \"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.2.3/dist/js/engine-core.js\",\n \"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/js/engine-ext.js\"\n ], function() {\n // \u5728\u6838\u5FC3\u4F9D\u8D56\u5C31\u7EEA\u540E\uFF0C\u5F3A\u5236\u4ECE\u7F51\u7EDC\u62C9\u53D6 react-simulator-renderer\uFF08\u907F\u514D\u4F7F\u7528\u7F13\u5B58\uFF09\n var rendererUrl = 'https://alifd.alicdn.com/npm/@alilc/lowcode-react-simulator-renderer@latest/dist/js/react-simulator-renderer.js';\n injectScriptFromNetwork(rendererUrl, function() {\n // renderer \u6CE8\u5165\u6210\u529F\u540E\u518D\u6CE8\u5165 fr-generator\uFF0C\u4FDD\u8BC1\u52A0\u8F7D\u987A\u5E8F\n var s = document.createElement('script');\n s.type = 'text/javascript';\n s.src = 'https://g.alicdn.com/fone-lowcode/fr-generator/1.1.0/js/index.js';\n s.onload = function() {\n try {\n window.__FR_GENERATOR_LOADED__ = true;\n parent.postMessage({ type: 'engine-load' }, '*');\n } catch (e) {}\n };\n s.onerror = function() {\n try { parent.postMessage({ type: 'engine-load' }, '*'); } catch(e) {}\n };\n document.body.appendChild(s);\n }, function(err) {\n // renderer \u6CE8\u5165\u5931\u8D25\uFF08fetch+blob \u6216\u5E26 timestamp \u7684\u56DE\u9000\u90FD\u5931\u8D25\uFF09\uFF0C\u4ECD\u7136\u5C1D\u8BD5\u52A0\u8F7D fr-generator\uFF08\u964D\u7EA7\uFF09\n var s = document.createElement('script');\n s.type = 'text/javascript';\n s.src = 'https://g.alicdn.com/fone-lowcode/fr-generator/1.1.0/js/index.js';\n s.onload = function() {\n try {\n window.__FR_GENERATOR_LOADED__ = true;\n parent.postMessage({ type: 'engine-load' }, '*');\n } catch (e) {}\n };\n s.onerror = function() {\n try { parent.postMessage({ type: 'engine-load' }, '*'); } catch(e) {}\n };\n document.body.appendChild(s);\n });\n });\n </script>\n </body>\n </html>\n ";
|
|
5
3
|
return html;
|
|
6
4
|
};
|
|
7
5
|
export default (function () {
|
package/lib/createIframe.js
CHANGED
|
@@ -5,9 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var createIframeContent = function createIframeContent() {
|
|
8
|
-
//
|
|
9
|
-
var timestamp = Math.floor(Date.now() / 1000);
|
|
10
|
-
var html = "\n <html>\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\" />\n <title>XRender</title>\n <link rel=\"icon\" href=\"https://img.alicdn.com/tfs/TB17UtINiLaK1RjSZFxXXamPFXa-606-643.png\">\n <link href=\"https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/variables.css\" rel=\"stylesheet\" />\n <link href=\"https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/dist/next.var.min.css\" rel=\"stylesheet\" />\n <link rel=\"stylesheet\" href=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.2.3/dist/css/engine-core.css\" />\n <link rel=\"stylesheet\" href=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/css/engine-ext.css\" />\n <link rel=\"stylesheet\" href=\"https://g.alicdn.com/fone-lowcode/fr-generator/1.1.0/css/index.css\" />\n\n <script>\n window.React = window.parent.React;\n window.ReactDOM = window.parent.ReactDOM;\n </script>\n \n <script src=\"https://g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js?t=".concat(timestamp, "\"></script>\n <script src=\"https://g.alicdn.com/platform/c/react15-polyfill/0.0.1/dist/index.js?t=").concat(timestamp, "\"></script>\n <script src=\"https://g.alicdn.com/platform/c/lodash/4.6.1/lodash.min.js?t=").concat(timestamp, "\"></script>\n <script src=\"https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js?t=").concat(timestamp, "\"></script>\n <script src=\"https://g.alicdn.com/code/lib/alifd__next/1.23.24/next.min.js?t=").concat(timestamp, "\"></script>\n <script crossorigin=\"anonymous\" src=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.2.3/dist/js/engine-core.js?t=").concat(timestamp, "\"></script>\n <script crossorigin=\"anonymous\" src=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/js/engine-ext.js?t=").concat(timestamp, "\"></script>\n\n <body>\n <div id=\"lce-container\"></div>\n <script type=\"text/javascript\" src=\"https://g.alicdn.com/fone-lowcode/fr-generator/1.1.0/js/index.js?t=").concat(timestamp, "\"></script>\n </body>\n </html>\n ");
|
|
8
|
+
var html = "\n <html>\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\" />\n <title>XRender</title>\n <link rel=\"icon\" href=\"https://img.alicdn.com/tfs/TB17UtINiLaK1RjSZFxXXamPFXa-606-643.png\">\n <link href=\"https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/variables.css\" rel=\"stylesheet\" />\n <link href=\"https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/dist/next.var.min.css\" rel=\"stylesheet\" />\n <link rel=\"stylesheet\" href=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.2.3/dist/css/engine-core.css\" />\n <link rel=\"stylesheet\" href=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/css/engine-ext.css\" />\n <link rel=\"stylesheet\" href=\"https://g.alicdn.com/fone-lowcode/fr-generator/1.1.0/css/index.css\" />\n\n <script>\n // \u5171\u4EAB\u7236\u7A97\u53E3\u7684 React/ReactDOM\uFF08\u4FDD\u6301\u539F\u884C\u4E3A\uFF09\n window.React = window.parent.React;\n window.ReactDOM = window.parent.ReactDOM;\n\n // ---- \u5B89\u5168\u4EE3\u7406\uFF1A\u786E\u4FDD getFormRenderMaterial \u8C03\u7528\u4E0D\u4F1A\u76F4\u63A5\u629B\u5F02\u5E38 ----\n (function installGetFormRenderMaterialProxy() {\n if (window.__getFormRenderMaterial_installed) return;\n window.__getFormRenderMaterial_installed = true;\n window.__getFormRenderMaterial_queue = [];\n\n Object.defineProperty(window, 'getFormRenderMaterial', {\n configurable: true,\n enumerable: true,\n get: function() {\n if (window.__real_getFormRenderMaterial) return window.__real_getFormRenderMaterial;\n return function() {\n window.__getFormRenderMaterial_queue.push(Array.prototype.slice.call(arguments));\n };\n },\n set: function(val) {\n if (typeof val === 'function') {\n window.__real_getFormRenderMaterial = val;\n var q = window.__getFormRenderMaterial_queue.splice(0);\n q.forEach(function(args) {\n try { window.__real_getFormRenderMaterial.apply(null, args); } catch (e) {}\n });\n try {\n Object.defineProperty(window, 'getFormRenderMaterial', {\n value: window.__real_getFormRenderMaterial,\n writable: true,\n configurable: true\n });\n } catch (e) {}\n } else {\n console.warn('Ignored non-function assignment to window.getFormRenderMaterial:', val);\n }\n }\n });\n\n // \u5C1D\u8BD5\u4EE3\u7406\u7236\u7A97\u53E3\uFF08\u540C\u6E90\u60C5\u51B5\u4E0B\uFF09\n try {\n setTimeout(function tryProxyParent() {\n try {\n if (window.parent && window.parent !== window && typeof window.parent.getFormRenderMaterial === 'function') {\n window.getFormRenderMaterial = function() {\n return window.parent.getFormRenderMaterial.apply(window.parent, arguments);\n };\n }\n } catch (e) {}\n }, 0);\n } catch (e) {}\n })();\n\n // ---- \u987A\u5E8F\u52A0\u8F7D\u811A\u672C\u7684\u5E2E\u52A9\u51FD\u6570 ----\n function loadScriptsSequential(urls, cb) {\n var i = 0;\n function next() {\n if (i >= urls.length) { cb && cb(); return; }\n var url = urls[i++];\n try {\n if (url.indexOf('engine-core') !== -1 && window.AliLowCodeEngine) return next();\n if (url.indexOf('engine-ext') !== -1 && window.AliLowCodeEngineExt) return next();\n } catch (e) {}\n var s = document.createElement('script');\n s.src = url;\n s.crossOrigin = 'anonymous';\n s.onload = next;\n s.onerror = function() { next(); };\n document.head.appendChild(s);\n }\n next();\n }\n\n // ---- \u5F3A\u5236\u4ECE\u7F51\u7EDC\u62C9\u53D6\u811A\u672C\u5E76\u6CE8\u5165\uFF08fetch + blob\uFF09\uFF0C\u5931\u8D25\u65F6\u56DE\u9000\u5230\u5E26\u65F6\u95F4\u6233\u7684\u666E\u901A\u52A0\u8F7D ----\n function injectScriptFromNetwork(url, onload, onerror) {\n // \u4F7F\u7528 fetch \u5F3A\u5236\u4E0D\u8D70\u7F13\u5B58\uFF08no-store\uFF09\uFF0C\u9700\u8981 CDN \u652F\u6301 CORS\n try {\n fetch(url, { cache: 'no-store', mode: 'cors' })\n .then(function(resp) {\n if (!resp.ok) throw new Error('fetch failed ' + resp.status);\n return resp.text();\n })\n .then(function(code) {\n var blob = new Blob([code], { type: 'text/javascript' });\n var blobUrl = URL.createObjectURL(blob);\n var s = document.createElement('script');\n s.src = blobUrl;\n s.onload = function() {\n URL.revokeObjectURL(blobUrl);\n onload && onload();\n };\n s.onerror = function(e) {\n URL.revokeObjectURL(blobUrl);\n (onerror && onerror(e));\n };\n document.head.appendChild(s);\n })\n .catch(function(err) {\n // fetch \u5931\u8D25\uFF08\u53EF\u80FD CORS\uFF09\uFF0C\u56DE\u9000\u5230\u5E26\u65F6\u95F4\u6233\u7684\u666E\u901A\u811A\u672C\u52A0\u8F7D\n var fallback = url + '?t=' + Date.now();\n var s2 = document.createElement('script');\n s2.src = fallback;\n s2.crossOrigin = 'anonymous';\n s2.onload = function() { onload && onload(); };\n s2.onerror = function(e) { onerror && onerror(e); };\n document.head.appendChild(s2);\n });\n } catch (e) {\n // \u73AF\u5883\u4E0D\u652F\u6301 fetch\uFF0C\u76F4\u63A5\u56DE\u9000\u5230\u5E26\u65F6\u95F4\u6233\n var s3 = document.createElement('script');\n s3.src = url + '?t=' + Date.now();\n s3.crossOrigin = 'anonymous';\n s3.onload = function() { onload && onload(); };\n s3.onerror = function(e) { onerror && onerror(e); };\n document.head.appendChild(s3);\n }\n }\n </script>\n </head>\n <body>\n <div id=\"lce-container\"></div>\n\n <script>\n // \u5148\u987A\u5E8F\u52A0\u8F7D\u901A\u7528\u4F9D\u8D56\n loadScriptsSequential([\n \"https://g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js\",\n \"https://g.alicdn.com/platform/c/react15-polyfill/0.0.1/dist/index.js\",\n \"https://g.alicdn.com/platform/c/lodash/4.6.1/lodash.min.js\",\n \"https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js\",\n \"https://g.alicdn.com/code/lib/alifd__next/1.23.24/next.min.js\",\n \"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.2.3/dist/js/engine-core.js\",\n \"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/js/engine-ext.js\"\n ], function() {\n // \u5728\u6838\u5FC3\u4F9D\u8D56\u5C31\u7EEA\u540E\uFF0C\u5F3A\u5236\u4ECE\u7F51\u7EDC\u62C9\u53D6 react-simulator-renderer\uFF08\u907F\u514D\u4F7F\u7528\u7F13\u5B58\uFF09\n var rendererUrl = 'https://alifd.alicdn.com/npm/@alilc/lowcode-react-simulator-renderer@latest/dist/js/react-simulator-renderer.js';\n injectScriptFromNetwork(rendererUrl, function() {\n // renderer \u6CE8\u5165\u6210\u529F\u540E\u518D\u6CE8\u5165 fr-generator\uFF0C\u4FDD\u8BC1\u52A0\u8F7D\u987A\u5E8F\n var s = document.createElement('script');\n s.type = 'text/javascript';\n s.src = 'https://g.alicdn.com/fone-lowcode/fr-generator/1.1.0/js/index.js';\n s.onload = function() {\n try {\n window.__FR_GENERATOR_LOADED__ = true;\n parent.postMessage({ type: 'engine-load' }, '*');\n } catch (e) {}\n };\n s.onerror = function() {\n try { parent.postMessage({ type: 'engine-load' }, '*'); } catch(e) {}\n };\n document.body.appendChild(s);\n }, function(err) {\n // renderer \u6CE8\u5165\u5931\u8D25\uFF08fetch+blob \u6216\u5E26 timestamp \u7684\u56DE\u9000\u90FD\u5931\u8D25\uFF09\uFF0C\u4ECD\u7136\u5C1D\u8BD5\u52A0\u8F7D fr-generator\uFF08\u964D\u7EA7\uFF09\n var s = document.createElement('script');\n s.type = 'text/javascript';\n s.src = 'https://g.alicdn.com/fone-lowcode/fr-generator/1.1.0/js/index.js';\n s.onload = function() {\n try {\n window.__FR_GENERATOR_LOADED__ = true;\n parent.postMessage({ type: 'engine-load' }, '*');\n } catch (e) {}\n };\n s.onerror = function() {\n try { parent.postMessage({ type: 'engine-load' }, '*'); } catch(e) {}\n };\n document.body.appendChild(s);\n });\n });\n </script>\n </body>\n </html>\n ";
|
|
11
9
|
return html;
|
|
12
10
|
};
|
|
13
11
|
var _default = exports.default = function _default() {
|