@flatbiz/pro-layout 5.2.4 → 5.2.6

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/dist/index.d.ts CHANGED
@@ -737,6 +737,8 @@ export type IframeApiProps = {
737
737
  iframeTabOperation: (type: "removeOther" | "removeAll" | "removeMe" | "refreshMe") => void;
738
738
  /** 判断是否在iframe中 */
739
739
  isInIframe: () => boolean;
740
+ /** 判断是否存在于flat iframe内 */
741
+ isInFlatIframe: () => boolean;
740
742
  /** 判断iframe链路上一级是否存在 */
741
743
  isExistPrevLink: () => boolean;
742
744
  /** 更新菜单徽标 */
package/dist/index.js CHANGED
@@ -500,6 +500,9 @@ var iframeApi = {
500
500
  isInIframe: function isInIframe() {
501
501
  return window.self !== window.top;
502
502
  },
503
+ isInFlatIframe: function isInFlatIframe() {
504
+ return window.self !== window.top && window.parent['__flat_iframe_parent_window'] === true;
505
+ },
503
506
  // iframe链路判断上一级是否存在
504
507
  isExistPrevLink: function isExistPrevLink() {
505
508
  var iframeNodeKey = window['__iframe_node_key'];
@@ -3255,6 +3258,7 @@ var PageContent = function PageContent() {
3255
3258
  redDotMap = _useLayoutCtx.redDotMap,
3256
3259
  onChangeActiveTabItemRedDot = _useLayoutCtx.onChangeActiveTabItemRedDot,
3257
3260
  showProdEnvGuide = _useLayoutCtx.showProdEnvGuide,
3261
+ hidenEnvGuide = _useLayoutCtx.hidenEnvGuide,
3258
3262
  developmentEnvGuideConfigs = _useLayoutCtx.developmentEnvGuideConfigs;
3259
3263
  var _useState = useState([]),
3260
3264
  _useState2 = _slicedToArray(_useState, 2),
@@ -3418,10 +3422,10 @@ var PageContent = function PageContent() {
3418
3422
  children: /*#__PURE__*/jsx(_CaretDownOutlined, {})
3419
3423
  })
3420
3424
  }
3421
- }), /*#__PURE__*/jsx(DevFloatHelp, {
3425
+ }), hidenEnvGuide !== true ? /*#__PURE__*/jsx(DevFloatHelp, {
3422
3426
  showProdEnvGuide: showProdEnvGuide,
3423
3427
  developmentEnvGuideConfigs: developmentEnvGuideConfigs
3424
- })]
3428
+ }) : null]
3425
3429
  });
3426
3430
  };
3427
3431
  var PageContentSingleFrame = function PageContentSingleFrame() {
@@ -3455,10 +3459,10 @@ var PageContentSingleFrame = function PageContentSingleFrame() {
3455
3459
  return prev.concat(actived === null || actived === void 0 ? void 0 : actived.iframeKey);
3456
3460
  });
3457
3461
  }
3458
- }, actived === null || actived === void 0 ? void 0 : actived.iframeKey), /*#__PURE__*/jsx(DevFloatHelp, {
3462
+ }, actived === null || actived === void 0 ? void 0 : actived.iframeKey), ctx.hidenEnvGuide !== true ? /*#__PURE__*/jsx(DevFloatHelp, {
3459
3463
  showProdEnvGuide: ctx.showProdEnvGuide,
3460
3464
  developmentEnvGuideConfigs: ctx.developmentEnvGuideConfigs
3461
- })]
3465
+ }) : null]
3462
3466
  });
3463
3467
  };
3464
3468
  var PageLevelContent = function PageLevelContent() {
@@ -4277,7 +4281,9 @@ var AppProvider = function AppProvider(props) {
4277
4281
  onDeleteCurrentIframeTabItemOpenTargetIframeTab: onDeleteCurrentIframeTabItemOpenTargetIframeTab,
4278
4282
  onOpenNewIframeThirdMenuItem: onOpenNewIframeThirdMenuItem,
4279
4283
  onChangeActiveTabItemRedDot: onChangeActiveTabItemRedDot,
4280
- redDotMap: redDotMap
4284
+ redDotMap: redDotMap,
4285
+ showProdEnvGuide: props.showProdEnvGuide,
4286
+ hidenEnvGuide: props.hidenEnvGuide
4281
4287
  });
4282
4288
  return /*#__PURE__*/jsxs(LayoutProvider, {
4283
4289
  value: appProviderValue,
@@ -4548,7 +4554,9 @@ var BootstrapContent = function BootstrapContent(options) {
4548
4554
  var globalData = getGlobalData();
4549
4555
  var routeList = function () {
4550
4556
  if (!globalData.moduleName) {
4551
- console.error('请在window.GLOBAL中添加属性moduleName(模块名称,例如:moduleName="system/admin")');
4557
+ // console.error(
4558
+ // '请在window.GLOBAL中添加属性moduleName(模块名称,例如:moduleName="system/admin")'
4559
+ // );
4552
4560
  return options.routeList;
4553
4561
  }
4554
4562
  var moduleName = removeSlash(globalData.moduleName, 'before-after');
@@ -4760,6 +4768,9 @@ var Bootstrap = function Bootstrap(options) {
4760
4768
  }
4761
4769
  };
4762
4770
  try {
4771
+ if (options.layoutMode === 'iframe-main') {
4772
+ window['__flat_iframe_parent_window'] = true;
4773
+ }
4763
4774
  if (options.getGlobalData) {
4764
4775
  return Promise.resolve(options.getGlobalData()).then(function ($await_3) {
4765
4776
  try {