@flatbiz/pro-layout 5.0.21 → 5.0.23

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
@@ -727,7 +727,11 @@ export type IframeApiProps = {
727
727
  openBrowserWindow: (url: string) => IframeApiProps;
728
728
  /** 刷新当前iframe tab */
729
729
  locationHref: (url: string) => IframeApiProps;
730
- /** iframe tab路由变更,可修改当前url地址(不会重新刷新当前页面) */
730
+ /**
731
+ * iframe tab路由变更,可修改当前url地址参数(不会重新刷新当前页面)
732
+ * ```
733
+ * 1. 目前只修改了iframeMain地址,iframeTab地址不会修改
734
+ */
731
735
  tabItemHistoryChange: (link: string) => IframeApiProps;
732
736
  /** 通过菜单Id打开新的iframe tab窗口 */
733
737
  openNewTabItemByMenuId: (id: string) => IframeApiProps;
package/dist/index.js CHANGED
@@ -3186,27 +3186,25 @@ var EventHandling = function EventHandling() {
3186
3186
  var _parseIframeMainUrlIn = parseIframeMainUrlInfo(_link),
3187
3187
  pathSearch = _parseIframeMainUrlIn.pathSearch;
3188
3188
  navigate(pathSearch);
3189
- var _target = parseSiderTargetMenuByPath(layoutCtx.siderBarTileMenus, _link);
3190
- var tabName = getIframeTabName(_link, _target.name);
3189
+ var currentActive = getCacheIframeActiveItem();
3191
3190
  // 更新缓存数据
3192
3191
  updateCaheIframeListByActiveId(layoutCtx.iframeTabActiveItem.id, {
3193
- link: _link,
3194
- name: tabName,
3195
- metaTitle: _target.metaTitle,
3192
+ link: guessIframeTabItemLink(_link),
3193
+ name: currentActive === null || currentActive === void 0 ? void 0 : currentActive.name,
3194
+ metaTitle: currentActive === null || currentActive === void 0 ? void 0 : currentActive.metaTitle,
3196
3195
  pathSearch: pathSearch
3197
3196
  });
3198
- layoutCtx.onUpdateIframeTabName(tabName);
3199
3197
  } else if (result.type === 'open_iframe_tabitem_by_menu_id') {
3200
3198
  var id = result.data;
3201
- var _target2 = layoutCtx.siderBarTileMenus.find(function (item) {
3199
+ var _target = layoutCtx.siderBarTileMenus.find(function (item) {
3202
3200
  return valueIsEqual(item.id, id);
3203
3201
  });
3204
- if (_target2) {
3205
- if ((_target2 === null || _target2 === void 0 ? void 0 : _target2.target) === '_blank') {
3206
- window.open(_target2.link);
3202
+ if (_target) {
3203
+ if ((_target === null || _target === void 0 ? void 0 : _target.target) === '_blank') {
3204
+ window.open(_target.link);
3207
3205
  return;
3208
3206
  }
3209
- layoutCtx.onIframeChange(_target2.id, 'menuClick', {
3207
+ layoutCtx.onIframeChange(_target.id, 'menuClick', {
3210
3208
  locationMenu: true
3211
3209
  });
3212
3210
  }
@@ -3215,10 +3213,10 @@ var EventHandling = function EventHandling() {
3215
3213
  var closedIframeTabId = (_result$data4 = result.data) === null || _result$data4 === void 0 ? void 0 : _result$data4['closedIframeTabId'];
3216
3214
  var operateLinkList = getIframeOpenNewTabItemOperateLinkList();
3217
3215
  if (closedIframeTabId) {
3218
- var _target3 = operateLinkList.find(function (item) {
3216
+ var _target2 = operateLinkList.find(function (item) {
3219
3217
  return item.endTabId === closedIframeTabId;
3220
3218
  });
3221
- layoutCtx.onDeleteCurrentIframeTabItemOpenTargetIframeTab(_target3 === null || _target3 === void 0 ? void 0 : _target3.startTabId, _target3 === null || _target3 === void 0 ? void 0 : _target3.startTabMenuId);
3219
+ layoutCtx.onDeleteCurrentIframeTabItemOpenTargetIframeTab(_target2 === null || _target2 === void 0 ? void 0 : _target2.startTabId, _target2 === null || _target2 === void 0 ? void 0 : _target2.startTabMenuId);
3222
3220
  }
3223
3221
  } else if (result.type === 'tab-item-red-dot-toggle') {
3224
3222
  var _result$data5;
@@ -3732,7 +3730,12 @@ var AppProvider = function AppProvider(props) {
3732
3730
  onIframeTabActiveEvent = props.onIframeTabActiveEvent,
3733
3731
  options = _objectWithoutProperties(props, _excluded);
3734
3732
  var isIframeMain = options.layoutMode === 'iframe-main';
3735
- var unMatchHiddenSiderBar = isUndefined(options.unMatchHiddenSiderBar) ? true : options.unMatchHiddenSiderBar;
3733
+ var unMatchHiddenSiderBar = useMemo(function () {
3734
+ if (options.disableTopbarMenu) {
3735
+ return false;
3736
+ }
3737
+ return isUndefined(options.unMatchHiddenSiderBar) ? true : options.unMatchHiddenSiderBar;
3738
+ }, [options.disableTopbarMenu, options.unMatchHiddenSiderBar]);
3736
3739
  var isMobile = useMediaQuery({
3737
3740
  query: '(max-width: 767px)'
3738
3741
  });