From 5d0b7d8438677caedceb20f82e7d3d8f38cfe4a1 Mon Sep 17 00:00:00 2001 From: zhaowei Date: Fri, 5 Sep 2025 08:33:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E9=9D=A2=E5=8C=85?= =?UTF-8?q?=E5=B1=91=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- react-ui/src/components/PageContainer/index.less | 8 +++++++- react-ui/src/components/PageContainer/index.tsx | 13 ++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) 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}
);