@ant-design/pro-components 2.0.0 → 2.0.1

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.
@@ -72627,6 +72627,22 @@ var PageContainer = function PageContainer(props) {
72627
72627
  restProps = objectWithoutProperties_objectWithoutProperties(props, PageContainer_excluded2);
72628
72628
 
72629
72629
  var value = (0,external_React_.useContext)(RouteContext);
72630
+ /** 告诉 props 是否存在 footerBar */
72631
+
72632
+ (0,external_React_.useEffect)(function () {
72633
+ var _value$setHasPageCont;
72634
+
72635
+ if (!value || !(value === null || value === void 0 ? void 0 : value.setHasPageContainer)) {
72636
+ return function () {};
72637
+ }
72638
+
72639
+ value === null || value === void 0 ? void 0 : (_value$setHasPageCont = value.setHasPageContainer) === null || _value$setHasPageCont === void 0 ? void 0 : _value$setHasPageCont.call(value, true);
72640
+ return function () {
72641
+ var _value$setHasPageCont2;
72642
+
72643
+ value === null || value === void 0 ? void 0 : (_value$setHasPageCont2 = value.setHasPageContainer) === null || _value$setHasPageCont2 === void 0 ? void 0 : _value$setHasPageCont2.call(value, false);
72644
+ }; // eslint-disable-next-line react-hooks/exhaustive-deps
72645
+ }, []);
72630
72646
 
72631
72647
  var _useContext = (0,external_React_.useContext)(ProLayoutContext),
72632
72648
  pageContainer = _useContext.pageContainer;
@@ -79466,9 +79482,10 @@ var genProLayoutStyle = function genProLayoutStyle(token) {
79466
79482
  '*': {
79467
79483
  boxSizing: 'border-box'
79468
79484
  },
79469
- '&-has-margin': {
79470
- marginBlock: token.pageContainer.marginBlockPageContainerContent,
79471
- marginInline: token.pageContainer.marginInlinePageContainerContent
79485
+ marginBlock: token.pageContainer.marginBlockPageContainerContent,
79486
+ marginInline: token.pageContainer.marginInlinePageContainerContent,
79487
+ '&-has-page-container': {
79488
+ margin: 0
79472
79489
  }
79473
79490
  }), defineProperty_defineProperty(_$concat12, "".concat(token.componentCls, "-bg-list"), {
79474
79491
  pointerEvents: 'none',
@@ -79702,10 +79719,13 @@ var useCurrentMenuLayoutProps = function useCurrentMenuLayoutProps(currentMenu)
79702
79719
 
79703
79720
 
79704
79721
  var WrapContent = function WrapContent(props) {
79722
+ var _classNames;
79723
+
79705
79724
  var style = props.style,
79706
79725
  prefixCls = props.prefixCls,
79707
- children = props.children;
79708
- var contentClassName = classnames_default()("".concat(prefixCls, "-content"), defineProperty_defineProperty({}, "".concat(prefixCls, "-has-header"), props.hasHeader));
79726
+ children = props.children,
79727
+ hasPageContainer = props.hasPageContainer;
79728
+ var contentClassName = classnames_default()("".concat(prefixCls, "-content"), (_classNames = {}, defineProperty_defineProperty(_classNames, "".concat(prefixCls, "-has-header"), props.hasHeader), defineProperty_defineProperty(_classNames, "".concat(prefixCls, "-content-has-page-container"), hasPageContainer), _classNames));
79709
79729
  var ErrorComponent = props.ErrorBoundary || ErrorBoundary;
79710
79730
  return props.ErrorBoundary === false ? (0,jsx_runtime.jsx)(external_antd_.Layout.Content, {
79711
79731
  className: contentClassName,
@@ -80144,6 +80164,11 @@ var BaseProLayout = function BaseProLayout(props) {
80144
80164
  hasFooterToolbar = _useState4[0],
80145
80165
  setHasFooterToolbar = _useState4[1];
80146
80166
 
80167
+ var _useState5 = (0,external_React_.useState)(false),
80168
+ _useState6 = slicedToArray_slicedToArray(_useState5, 2),
80169
+ hasPageContainer = _useState6[0],
80170
+ setHasPageContainer = _useState6[1];
80171
+
80147
80172
  useDocumentTitle(pageTitleInfo, props.title || false);
80148
80173
  var bgImgStyleList = (0,external_React_.useMemo)(function () {
80149
80174
  if (bgLayoutImgList && bgLayoutImgList.length > 0) {
@@ -80166,6 +80191,8 @@ var BaseProLayout = function BaseProLayout(props) {
80166
80191
  menuData: menuData,
80167
80192
  isMobile: isMobile,
80168
80193
  collapsed: collapsed,
80194
+ hasPageContainer: hasPageContainer,
80195
+ setHasPageContainer: setHasPageContainer,
80169
80196
  isChildrenLayout: true,
80170
80197
  title: pageTitleInfo.pageName,
80171
80198
  hasSiderMenu: !!siderMenuDom,
@@ -80194,7 +80221,7 @@ var BaseProLayout = function BaseProLayout(props) {
80194
80221
  style: genLayoutStyle,
80195
80222
  className: context.getPrefixCls('layout'),
80196
80223
  children: [headerDom, (0,jsx_runtime.jsx)(WrapContent, objectSpread2_objectSpread2(objectSpread2_objectSpread2({
80197
- autoClearCache: false,
80224
+ hasPageContainer: hasPageContainer,
80198
80225
  isChildrenLayout: isChildrenLayout
80199
80226
  }, rest), {}, {
80200
80227
  hasHeader: !!headerDom,
@@ -106857,11 +106884,11 @@ function BaseProList(props) {
106857
106884
  ;// CONCATENATED MODULE: ./packages/components/src/version.ts
106858
106885
  var version_version = {
106859
106886
  "@ant-design/pro-card": "2.0.0-experimental.15",
106860
- "@ant-design/pro-components": "2.0.0-experimental.25",
106887
+ "@ant-design/pro-components": "2.0.0-experimental.26",
106861
106888
  "@ant-design/pro-descriptions": "2.0.0-experimental.15",
106862
106889
  "@ant-design/pro-field": "2.0.0-experimental.15",
106863
106890
  "@ant-design/pro-form": "2.0.0-experimental.15",
106864
- "@ant-design/pro-layout": "7.0.0-experimental.25",
106891
+ "@ant-design/pro-layout": "7.0.0-experimental.26",
106865
106892
  "@ant-design/pro-list": "2.0.0-experimental.16",
106866
106893
  "@ant-design/pro-provider": "2.0.0-experimental.10",
106867
106894
  "@ant-design/pro-skeleton": "2.0.0-experimental.7",