@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.
@@ -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 \n // \u7B49\u5F85\u5F15\u64CE\u52A0\u8F7D\u5B8C\u6210\u540E\u4FEE\u6539\u6309\u94AE\u6587\u5B57\n function waitForEngineAndModifyButton() {\n // \u68C0\u67E5\u5F15\u64CE\u662F\u5426\u52A0\u8F7D\u5B8C\u6210\n if (window.__FR_ENGINE__) {\n modifyExportButtonText();\n } else {\n // \u5982\u679C\u5F15\u64CE\u8FD8\u6CA1\u52A0\u8F7D\uFF0C\u7B49\u5F85\u4E00\u6BB5\u65F6\u95F4\u540E\u91CD\u8BD5\n setTimeout(waitForEngineAndModifyButton, 100);\n }\n }\n \n // \u4FEE\u6539\u5BFC\u51FA\u6309\u94AE\u6587\u5B57\u7684\u51FD\u6570\n function modifyExportButtonText() {\n // \u5C1D\u8BD5\u591A\u79CD\u65B9\u5F0F\u67E5\u627E\u5BFC\u51FA\u6309\u94AE\n const selectors = [\n '.export-btn',\n '.export-button', \n '.fr-generator-export-btn',\n '.fr-generator-export-button',\n '[data-testid*=\"export\"]',\n '[data-testid*=\"exportBtn\"]',\n '.ant-btn[title*=\"\u5BFC\u51FA\"]',\n '.ant-btn[aria-label*=\"\u5BFC\u51FA\"]',\n 'button:contains(\"\u5BFC\u51FA\")',\n 'span:contains(\"\u5BFC\u51FA\")'\n ];\n \n let exportButton = null;\n \n // \u67E5\u627E\u6309\u94AE\n for (const selector of selectors) {\n try {\n if (selector.includes(':contains')) {\n // \u5904\u7406 :contains \u9009\u62E9\u5668\n const text = selector.match(/:contains(\"([^\"]+)\")/)[1];\n const elements = Array.from(document.querySelectorAll('*')).filter(el => \n el.textContent && el.textContent.includes(text)\n );\n if (elements.length > 0) {\n exportButton = elements[0];\n break;\n }\n } else {\n exportButton = document.querySelector(selector);\n if (exportButton) break;\n }\n } catch (e) {\n // \u5FFD\u7565\u9009\u62E9\u5668\u9519\u8BEF\n }\n }\n \n // \u5982\u679C\u627E\u5230\u4E86\u6309\u94AE\uFF0C\u4FEE\u6539\u6587\u5B57\n if (exportButton) {\n // \u65B9\u6CD51\uFF1A\u76F4\u63A5\u4FEE\u6539 textContent\n if (exportButton.textContent) {\n exportButton.textContent = exportButton.textContent.replace(/\u5BFC\u51FA/g, '\u4FDD\u5B58');\n }\n \n // \u65B9\u6CD52\uFF1A\u4FEE\u6539\u5B50\u5143\u7D20\u7684\u6587\u5B57\n const textElements = exportButton.querySelectorAll('span, div, label');\n textElements.forEach(el => {\n if (el.textContent && el.textContent.includes('\u5BFC\u51FA')) {\n el.textContent = el.textContent.replace(/\u5BFC\u51FA/g, '\u4FDD\u5B58');\n }\n });\n \n // \u65B9\u6CD53\uFF1A\u4FEE\u6539 title \u548C aria-label \u5C5E\u6027\n if (exportButton.title) {\n exportButton.title = exportButton.title.replace(/\u5BFC\u51FA/g, '\u4FDD\u5B58');\n }\n if (exportButton.getAttribute('aria-label')) {\n exportButton.setAttribute('aria-label', \n exportButton.getAttribute('aria-label').replace(/\u5BFC\u51FA/g, '\u4FDD\u5B58')\n );\n }\n \n console.log('\u6210\u529F\u5C06\u5BFC\u51FA\u6309\u94AE\u6587\u5B57\u6539\u4E3A\"\u4FDD\u5B58\"');\n } else {\n console.log('\u672A\u627E\u5230\u5BFC\u51FA\u6309\u94AE\uFF0C\u53EF\u80FD\u9009\u62E9\u5668\u4E0D\u6B63\u786E');\n }\n }\n \n // \u76D1\u542C\u5F15\u64CE\u52A0\u8F7D\u5B8C\u6210\u4E8B\u4EF6\n window.addEventListener('message', function(event) {\n if (event.data.type === 'engine-load') {\n // \u5F15\u64CE\u52A0\u8F7D\u5B8C\u6210\u540E\uFF0C\u7B49\u5F85\u4E00\u6BB5\u65F6\u95F4\u518D\u4FEE\u6539\u6309\u94AE\n setTimeout(waitForEngineAndModifyButton, 500);\n }\n });\n \n // \u9875\u9762\u52A0\u8F7D\u5B8C\u6210\u540E\u4E5F\u5C1D\u8BD5\u4FEE\u6539\n document.addEventListener('DOMContentLoaded', function() {\n setTimeout(waitForEngineAndModifyButton, 1000);\n });\n \n // \u5B9A\u671F\u68C0\u67E5\u5E76\u4FEE\u6539\uFF08\u4F5C\u4E3A\u5907\u9009\u65B9\u6848\uFF09\n setInterval(waitForEngineAndModifyButton, 2000);\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 <style>\n /* \u81EA\u5B9A\u4E49\u6837\u5F0F\uFF1A\u5C06\u5BFC\u51FA\u6309\u94AE\u6587\u5B57\u6539\u4E3A\"\u4FDD\u5B58\" */\n /* \u5C1D\u8BD5\u591A\u79CD\u53EF\u80FD\u7684\u9009\u62E9\u5668 */\n .export-btn,\n .export-button,\n .fr-generator-export-btn,\n .fr-generator-export-button,\n [data-testid*=\"export\"],\n [data-testid*=\"exportBtn\"],\n .ant-btn[title*=\"\u5BFC\u51FA\"],\n .ant-btn[aria-label*=\"\u5BFC\u51FA\"] {\n /* \u901A\u8FC7 CSS \u4FEE\u6539\u6309\u94AE\u6587\u5B57 */\n }\n \n /* \u5982\u679C\u6309\u94AE\u6587\u5B57\u662F\u901A\u8FC7 ::before \u6216 ::after \u4F2A\u5143\u7D20\u663E\u793A\u7684 */\n .export-btn::before,\n .export-button::before,\n .fr-generator-export-btn::before,\n .fr-generator-export-button::before {\n content: \"\u4FDD\u5B58\" !important;\n }\n \n /* \u5982\u679C\u6309\u94AE\u6587\u5B57\u662F\u901A\u8FC7 ::after \u4F2A\u5143\u7D20\u663E\u793A\u7684 */\n .export-btn::after,\n .export-button::after,\n .fr-generator-export-btn::after,\n .fr-generator-export-button::after {\n content: \"\u4FDD\u5B58\" !important;\n }\n \n /* \u9690\u85CF\u539F\u59CB\u6587\u5B57\u5E76\u6DFB\u52A0\u65B0\u6587\u5B57 */\n .export-btn span,\n .export-button span,\n .fr-generator-export-btn span,\n .fr-generator-export-button span {\n position: relative;\n }\n \n .export-btn span::before,\n .export-button span::before,\n .fr-generator-export-btn span::before,\n .fr-generator-export-button span::before {\n content: \"\u4FDD\u5B58\";\n position: absolute;\n left: 0;\n top: 0;\n background: inherit;\n color: inherit;\n font-size: inherit;\n font-weight: inherit;\n }\n </style>\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 ";
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, _iframe6, _iframe6$contentWindo, _iframe6$contentWindo2;
46
+ var _iframe5, _iframe5$contentWindo, _iframe5$contentWindo2;
47
47
  if (event.data.type !== 'engine-load') {
48
48
  return;
49
49
  }
50
- var engine = (_iframe5 = iframe) === null || _iframe5 === void 0 ? void 0 : (_iframe5$contentWindo = _iframe5.contentWindow) === null || _iframe5$contentWindo === void 0 ? void 0 : _iframe5$contentWindo.__FR_ENGINE__;
51
- (_iframe6 = iframe) === null || _iframe6 === void 0 ? void 0 : (_iframe6$contentWindo = _iframe6.contentWindow) === null || _iframe6$contentWindo === void 0 ? void 0 : (_iframe6$contentWindo2 = _iframe6$contentWindo.__FR_ENGINE__) === null || _iframe6$contentWindo2 === void 0 ? void 0 : _iframe6$contentWindo2.init(_objectSpread({
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
  };
@@ -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 \n // \u7B49\u5F85\u5F15\u64CE\u52A0\u8F7D\u5B8C\u6210\u540E\u4FEE\u6539\u6309\u94AE\u6587\u5B57\n function waitForEngineAndModifyButton() {\n // \u68C0\u67E5\u5F15\u64CE\u662F\u5426\u52A0\u8F7D\u5B8C\u6210\n if (window.__FR_ENGINE__) {\n modifyExportButtonText();\n } else {\n // \u5982\u679C\u5F15\u64CE\u8FD8\u6CA1\u52A0\u8F7D\uFF0C\u7B49\u5F85\u4E00\u6BB5\u65F6\u95F4\u540E\u91CD\u8BD5\n setTimeout(waitForEngineAndModifyButton, 100);\n }\n }\n \n // \u4FEE\u6539\u5BFC\u51FA\u6309\u94AE\u6587\u5B57\u7684\u51FD\u6570\n function modifyExportButtonText() {\n // \u5C1D\u8BD5\u591A\u79CD\u65B9\u5F0F\u67E5\u627E\u5BFC\u51FA\u6309\u94AE\n const selectors = [\n '.export-btn',\n '.export-button', \n '.fr-generator-export-btn',\n '.fr-generator-export-button',\n '[data-testid*=\"export\"]',\n '[data-testid*=\"exportBtn\"]',\n '.ant-btn[title*=\"\u5BFC\u51FA\"]',\n '.ant-btn[aria-label*=\"\u5BFC\u51FA\"]',\n 'button:contains(\"\u5BFC\u51FA\")',\n 'span:contains(\"\u5BFC\u51FA\")'\n ];\n \n let exportButton = null;\n \n // \u67E5\u627E\u6309\u94AE\n for (const selector of selectors) {\n try {\n if (selector.includes(':contains')) {\n // \u5904\u7406 :contains \u9009\u62E9\u5668\n const text = selector.match(/:contains(\"([^\"]+)\")/)[1];\n const elements = Array.from(document.querySelectorAll('*')).filter(el => \n el.textContent && el.textContent.includes(text)\n );\n if (elements.length > 0) {\n exportButton = elements[0];\n break;\n }\n } else {\n exportButton = document.querySelector(selector);\n if (exportButton) break;\n }\n } catch (e) {\n // \u5FFD\u7565\u9009\u62E9\u5668\u9519\u8BEF\n }\n }\n \n // \u5982\u679C\u627E\u5230\u4E86\u6309\u94AE\uFF0C\u4FEE\u6539\u6587\u5B57\n if (exportButton) {\n // \u65B9\u6CD51\uFF1A\u76F4\u63A5\u4FEE\u6539 textContent\n if (exportButton.textContent) {\n exportButton.textContent = exportButton.textContent.replace(/\u5BFC\u51FA/g, '\u4FDD\u5B58');\n }\n \n // \u65B9\u6CD52\uFF1A\u4FEE\u6539\u5B50\u5143\u7D20\u7684\u6587\u5B57\n const textElements = exportButton.querySelectorAll('span, div, label');\n textElements.forEach(el => {\n if (el.textContent && el.textContent.includes('\u5BFC\u51FA')) {\n el.textContent = el.textContent.replace(/\u5BFC\u51FA/g, '\u4FDD\u5B58');\n }\n });\n \n // \u65B9\u6CD53\uFF1A\u4FEE\u6539 title \u548C aria-label \u5C5E\u6027\n if (exportButton.title) {\n exportButton.title = exportButton.title.replace(/\u5BFC\u51FA/g, '\u4FDD\u5B58');\n }\n if (exportButton.getAttribute('aria-label')) {\n exportButton.setAttribute('aria-label', \n exportButton.getAttribute('aria-label').replace(/\u5BFC\u51FA/g, '\u4FDD\u5B58')\n );\n }\n \n console.log('\u6210\u529F\u5C06\u5BFC\u51FA\u6309\u94AE\u6587\u5B57\u6539\u4E3A\"\u4FDD\u5B58\"');\n } else {\n console.log('\u672A\u627E\u5230\u5BFC\u51FA\u6309\u94AE\uFF0C\u53EF\u80FD\u9009\u62E9\u5668\u4E0D\u6B63\u786E');\n }\n }\n \n // \u76D1\u542C\u5F15\u64CE\u52A0\u8F7D\u5B8C\u6210\u4E8B\u4EF6\n window.addEventListener('message', function(event) {\n if (event.data.type === 'engine-load') {\n // \u5F15\u64CE\u52A0\u8F7D\u5B8C\u6210\u540E\uFF0C\u7B49\u5F85\u4E00\u6BB5\u65F6\u95F4\u518D\u4FEE\u6539\u6309\u94AE\n setTimeout(waitForEngineAndModifyButton, 500);\n }\n });\n \n // \u9875\u9762\u52A0\u8F7D\u5B8C\u6210\u540E\u4E5F\u5C1D\u8BD5\u4FEE\u6539\n document.addEventListener('DOMContentLoaded', function() {\n setTimeout(waitForEngineAndModifyButton, 1000);\n });\n \n // \u5B9A\u671F\u68C0\u67E5\u5E76\u4FEE\u6539\uFF08\u4F5C\u4E3A\u5907\u9009\u65B9\u6848\uFF09\n setInterval(waitForEngineAndModifyButton, 2000);\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 <style>\n /* \u81EA\u5B9A\u4E49\u6837\u5F0F\uFF1A\u5C06\u5BFC\u51FA\u6309\u94AE\u6587\u5B57\u6539\u4E3A\"\u4FDD\u5B58\" */\n /* \u5C1D\u8BD5\u591A\u79CD\u53EF\u80FD\u7684\u9009\u62E9\u5668 */\n .export-btn,\n .export-button,\n .fr-generator-export-btn,\n .fr-generator-export-button,\n [data-testid*=\"export\"],\n [data-testid*=\"exportBtn\"],\n .ant-btn[title*=\"\u5BFC\u51FA\"],\n .ant-btn[aria-label*=\"\u5BFC\u51FA\"] {\n /* \u901A\u8FC7 CSS \u4FEE\u6539\u6309\u94AE\u6587\u5B57 */\n }\n \n /* \u5982\u679C\u6309\u94AE\u6587\u5B57\u662F\u901A\u8FC7 ::before \u6216 ::after \u4F2A\u5143\u7D20\u663E\u793A\u7684 */\n .export-btn::before,\n .export-button::before,\n .fr-generator-export-btn::before,\n .fr-generator-export-button::before {\n content: \"\u4FDD\u5B58\" !important;\n }\n \n /* \u5982\u679C\u6309\u94AE\u6587\u5B57\u662F\u901A\u8FC7 ::after \u4F2A\u5143\u7D20\u663E\u793A\u7684 */\n .export-btn::after,\n .export-button::after,\n .fr-generator-export-btn::after,\n .fr-generator-export-button::after {\n content: \"\u4FDD\u5B58\" !important;\n }\n \n /* \u9690\u85CF\u539F\u59CB\u6587\u5B57\u5E76\u6DFB\u52A0\u65B0\u6587\u5B57 */\n .export-btn span,\n .export-button span,\n .fr-generator-export-btn span,\n .fr-generator-export-button span {\n position: relative;\n }\n \n .export-btn span::before,\n .export-button span::before,\n .fr-generator-export-btn span::before,\n .fr-generator-export-button span::before {\n content: \"\u4FDD\u5B58\";\n position: absolute;\n left: 0;\n top: 0;\n background: inherit;\n color: inherit;\n font-size: inherit;\n font-weight: inherit;\n }\n </style>\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 ";
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, _iframe6, _iframe6$contentWindo, _iframe6$contentWindo2;
54
+ var _iframe5, _iframe5$contentWindo, _iframe5$contentWindo2;
55
55
  if (event.data.type !== 'engine-load') {
56
56
  return;
57
57
  }
58
- var engine = (_iframe5 = iframe) === null || _iframe5 === void 0 ? void 0 : (_iframe5$contentWindo = _iframe5.contentWindow) === null || _iframe5$contentWindo === void 0 ? void 0 : _iframe5$contentWindo.__FR_ENGINE__;
59
- (_iframe6 = iframe) === null || _iframe6 === void 0 ? void 0 : (_iframe6$contentWindo = _iframe6.contentWindow) === null || _iframe6$contentWindo === void 0 ? void 0 : (_iframe6$contentWindo2 = _iframe6$contentWindo.__FR_ENGINE__) === null || _iframe6$contentWindo2 === void 0 ? void 0 : _iframe6$contentWindo2.init(_objectSpread({
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zzdadelu/schema-builder",
3
- "version": "1.0.0-alpha.8",
3
+ "version": "1.0.0-alpha.9",
4
4
  "description": "通过 JSON Schema 生成标准 Form,常用于自定义搭建配置界面生成",
5
5
  "keywords": [
6
6
  "Form",