@zzdadelu/schema-builder 1.0.0-alpha.8 → 1.0.0-alpha.9
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 -1
- package/es/main.js +3 -24
- package/lib/createIframe.js +1 -1
- package/lib/main.js +3 -24
- package/package.json +1 -1
package/es/createIframe.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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 window.React = window.parent.React;\n window.ReactDOM = window.parent.ReactDOM;\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 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\"></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\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 () {
|
package/es/main.js
CHANGED
|
@@ -43,38 +43,17 @@ var Design = function Design(props, ref) {
|
|
|
43
43
|
containerRef.current.appendChild(iframe);
|
|
44
44
|
};
|
|
45
45
|
var engineOnLoad = function engineOnLoad(event) {
|
|
46
|
-
var _iframe5, _iframe5$contentWindo,
|
|
46
|
+
var _iframe5, _iframe5$contentWindo, _iframe5$contentWindo2;
|
|
47
47
|
if (event.data.type !== 'engine-load') {
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
(
|
|
50
|
+
console.log("拿到 iframe props:", event.data.data);
|
|
51
|
+
(_iframe5 = iframe) === null || _iframe5 === void 0 ? void 0 : (_iframe5$contentWindo = _iframe5.contentWindow) === null || _iframe5$contentWindo === void 0 ? void 0 : (_iframe5$contentWindo2 = _iframe5$contentWindo.__FR_ENGINE__) === null || _iframe5$contentWindo2 === void 0 ? void 0 : _iframe5$contentWindo2.init(_objectSpread({
|
|
52
52
|
settings: _objectSpread(_objectSpread({}, defaultSetting), settings),
|
|
53
53
|
widgets: widgets,
|
|
54
54
|
// recordEnable: true,
|
|
55
55
|
logo: {
|
|
56
56
|
title: 'XRender'
|
|
57
|
-
},
|
|
58
|
-
// 自定义按钮文字配置 - 尝试多种可能的配置键
|
|
59
|
-
buttonText: {
|
|
60
|
-
export: '保存' // 将导出按钮文字改为"保存"
|
|
61
|
-
},
|
|
62
|
-
// 其他可能的配置键
|
|
63
|
-
exportBtnText: '保存',
|
|
64
|
-
exportButtonText: '保存',
|
|
65
|
-
// 国际化配置
|
|
66
|
-
locale: {
|
|
67
|
-
export: '保存'
|
|
68
|
-
},
|
|
69
|
-
// 自定义配置
|
|
70
|
-
customConfig: {
|
|
71
|
-
exportButtonLabel: '保存'
|
|
72
|
-
},
|
|
73
|
-
// 按钮配置
|
|
74
|
-
buttons: {
|
|
75
|
-
export: {
|
|
76
|
-
text: '保存'
|
|
77
|
-
}
|
|
78
57
|
}
|
|
79
58
|
}, restProps));
|
|
80
59
|
};
|
package/lib/createIframe.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
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 window.React = window.parent.React;\n window.ReactDOM = window.parent.ReactDOM;\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 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\"></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\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() {
|
package/lib/main.js
CHANGED
|
@@ -51,38 +51,17 @@ var Design = function Design(props, ref) {
|
|
|
51
51
|
containerRef.current.appendChild(iframe);
|
|
52
52
|
};
|
|
53
53
|
var engineOnLoad = function engineOnLoad(event) {
|
|
54
|
-
var _iframe5, _iframe5$contentWindo,
|
|
54
|
+
var _iframe5, _iframe5$contentWindo, _iframe5$contentWindo2;
|
|
55
55
|
if (event.data.type !== 'engine-load') {
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
(
|
|
58
|
+
console.log("拿到 iframe props:", event.data.data);
|
|
59
|
+
(_iframe5 = iframe) === null || _iframe5 === void 0 ? void 0 : (_iframe5$contentWindo = _iframe5.contentWindow) === null || _iframe5$contentWindo === void 0 ? void 0 : (_iframe5$contentWindo2 = _iframe5$contentWindo.__FR_ENGINE__) === null || _iframe5$contentWindo2 === void 0 ? void 0 : _iframe5$contentWindo2.init(_objectSpread({
|
|
60
60
|
settings: _objectSpread(_objectSpread({}, defaultSetting), settings),
|
|
61
61
|
widgets: widgets,
|
|
62
62
|
// recordEnable: true,
|
|
63
63
|
logo: {
|
|
64
64
|
title: 'XRender'
|
|
65
|
-
},
|
|
66
|
-
// 自定义按钮文字配置 - 尝试多种可能的配置键
|
|
67
|
-
buttonText: {
|
|
68
|
-
export: '保存' // 将导出按钮文字改为"保存"
|
|
69
|
-
},
|
|
70
|
-
// 其他可能的配置键
|
|
71
|
-
exportBtnText: '保存',
|
|
72
|
-
exportButtonText: '保存',
|
|
73
|
-
// 国际化配置
|
|
74
|
-
locale: {
|
|
75
|
-
export: '保存'
|
|
76
|
-
},
|
|
77
|
-
// 自定义配置
|
|
78
|
-
customConfig: {
|
|
79
|
-
exportButtonLabel: '保存'
|
|
80
|
-
},
|
|
81
|
-
// 按钮配置
|
|
82
|
-
buttons: {
|
|
83
|
-
export: {
|
|
84
|
-
text: '保存'
|
|
85
|
-
}
|
|
86
65
|
}
|
|
87
66
|
}, restProps));
|
|
88
67
|
};
|