diff --git a/react-ui/src/components/PageContainer/index.less b/react-ui/src/components/PageContainer/index.less index 6f055f71..5fc3b48a 100644 --- a/react-ui/src/components/PageContainer/index.less +++ b/react-ui/src/components/PageContainer/index.less @@ -1,14 +1,20 @@ .kf-page-container { + display: flex; + flex-direction: column; + width: 100%; height: 100%; &__breadcrumb { display: flex; + flex: none; align-items: center; + width: 100%; height: 70px; padding-left: 30px; } &__content { - height: calc(100% - 70px); + flex: 1; + width: 100%; } } diff --git a/react-ui/src/components/PageContainer/index.tsx b/react-ui/src/components/PageContainer/index.tsx index c8a35416..878294ac 100644 --- a/react-ui/src/components/PageContainer/index.tsx +++ b/react-ui/src/components/PageContainer/index.tsx @@ -3,11 +3,18 @@ import React from 'react'; import './index.less'; function PageContainer({ children }: { children: React.ReactNode }) { + const { pathname } = location; + const showBreadcrumb = pathname.split('/').filter((v) => v !== '').length >= 2; + console.log('111', pathname); + return (
-
- -
+ {showBreadcrumb && ( +
+ +
+ )} +
{children}
);