@zzdadelu/schema-builder 1.0.0-alpha.61 → 1.0.0-alpha.62
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 +3 -4
- package/lib/createIframe.js +3 -4
- package/package.json +1 -1
package/es/createIframe.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var createIframeContent = function createIframeContent(
|
|
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
|
|
1
|
+
var createIframeContent = function createIframeContent() {
|
|
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 // 1. \u9996\u5148\u6CE8\u5165\u7236\u7A97\u53E3\u7684\u5BF9\u8C61\n window.React = window.parent.React;\n window.ReactDOM = window.parent.ReactDOM;\n \n // 2. \u5B9A\u4E49getFormRenderMaterial\u51FD\u6570\n window.getFormRenderMaterial = function(libraryName, packageName) {\n // \u4ECE\u7236\u7A97\u53E3\u83B7\u53D6\u7269\u6599\n if (window.parent.getFormRenderMaterial) {\n return window.parent.getFormRenderMaterial(libraryName, packageName);\n }\n \n // \u6216\u8005\u76F4\u63A5\u5B9A\u4E49\u7269\u6599\n if (libraryName === \"AliFormRenderMaterial\") {\n // \u8FD9\u91CC\u9700\u8981\u7B49\u5230\u76F8\u5E94\u7684\u7EC4\u4EF6\u5E93\u52A0\u8F7D\u5B8C\u6210\u540E\u624D\u80FD\u83B7\u53D6\n // \u53EF\u4EE5\u8FD4\u56DE\u4E00\u4E2A\u4EE3\u7406\u5BF9\u8C61\u6216\u8005\u5EF6\u8FDF\u52A0\u8F7D\n return new Proxy({}, {\n get: function(target, prop) {\n // \u5EF6\u8FDF\u83B7\u53D6\u7EC4\u4EF6\n if (window[libraryName]) {\n return window[libraryName][prop];\n }\n return undefined;\n }\n });\n }\n return null;\n };\n </script>\n \n <script src=\"https://g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js\"></script>\n <script src=\"https://g.alicdn.com/platform/c/react15-polyfill/0.0.1/dist/index.js\"></script>\n <script src=\"https://g.alicdn.com/platform/c/lodash/4.6.1/lodash.min.js\"></script>\n <script src=\"https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js\"></script>\n <script src=\"https://g.alicdn.com/code/lib/alifd__next/1.23.24/next.min.js\"></script>\n <script crossorigin=\"anonymous\" src=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.2.3/dist/js/engine-core.js\"></script>\n <script crossorigin=\"anonymous\" src=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/js/engine-ext.js\"></script>\n </head>\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\"></script>\n </body>\n </html>\n ";
|
|
3
3
|
return html;
|
|
4
4
|
};
|
|
5
5
|
export default (function () {
|
|
@@ -7,7 +7,6 @@ export default (function () {
|
|
|
7
7
|
iframe.width = '100%';
|
|
8
8
|
iframe.height = '100%';
|
|
9
9
|
iframe.frameBorder = '0';
|
|
10
|
-
|
|
11
|
-
iframe.srcdoc = createIframeContent(ts);
|
|
10
|
+
iframe.srcdoc = createIframeContent();
|
|
12
11
|
return iframe;
|
|
13
12
|
});
|
package/lib/createIframe.js
CHANGED
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var createIframeContent = function createIframeContent(
|
|
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
|
|
7
|
+
var createIframeContent = function createIframeContent() {
|
|
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 // 1. \u9996\u5148\u6CE8\u5165\u7236\u7A97\u53E3\u7684\u5BF9\u8C61\n window.React = window.parent.React;\n window.ReactDOM = window.parent.ReactDOM;\n \n // 2. \u5B9A\u4E49getFormRenderMaterial\u51FD\u6570\n window.getFormRenderMaterial = function(libraryName, packageName) {\n // \u4ECE\u7236\u7A97\u53E3\u83B7\u53D6\u7269\u6599\n if (window.parent.getFormRenderMaterial) {\n return window.parent.getFormRenderMaterial(libraryName, packageName);\n }\n \n // \u6216\u8005\u76F4\u63A5\u5B9A\u4E49\u7269\u6599\n if (libraryName === \"AliFormRenderMaterial\") {\n // \u8FD9\u91CC\u9700\u8981\u7B49\u5230\u76F8\u5E94\u7684\u7EC4\u4EF6\u5E93\u52A0\u8F7D\u5B8C\u6210\u540E\u624D\u80FD\u83B7\u53D6\n // \u53EF\u4EE5\u8FD4\u56DE\u4E00\u4E2A\u4EE3\u7406\u5BF9\u8C61\u6216\u8005\u5EF6\u8FDF\u52A0\u8F7D\n return new Proxy({}, {\n get: function(target, prop) {\n // \u5EF6\u8FDF\u83B7\u53D6\u7EC4\u4EF6\n if (window[libraryName]) {\n return window[libraryName][prop];\n }\n return undefined;\n }\n });\n }\n return null;\n };\n </script>\n \n <script src=\"https://g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js\"></script>\n <script src=\"https://g.alicdn.com/platform/c/react15-polyfill/0.0.1/dist/index.js\"></script>\n <script src=\"https://g.alicdn.com/platform/c/lodash/4.6.1/lodash.min.js\"></script>\n <script src=\"https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js\"></script>\n <script src=\"https://g.alicdn.com/code/lib/alifd__next/1.23.24/next.min.js\"></script>\n <script crossorigin=\"anonymous\" src=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.2.3/dist/js/engine-core.js\"></script>\n <script crossorigin=\"anonymous\" src=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/js/engine-ext.js\"></script>\n </head>\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\"></script>\n </body>\n </html>\n ";
|
|
9
9
|
return html;
|
|
10
10
|
};
|
|
11
11
|
var _default = exports.default = function _default() {
|
|
@@ -13,7 +13,6 @@ var _default = exports.default = function _default() {
|
|
|
13
13
|
iframe.width = '100%';
|
|
14
14
|
iframe.height = '100%';
|
|
15
15
|
iframe.frameBorder = '0';
|
|
16
|
-
|
|
17
|
-
iframe.srcdoc = createIframeContent(ts);
|
|
16
|
+
iframe.srcdoc = createIframeContent();
|
|
18
17
|
return iframe;
|
|
19
18
|
};
|