From dccba8e39f374eba69708c7f5d84a3230355c155 Mon Sep 17 00:00:00 2001 From: hejiaqiang Date: Mon, 21 Mar 2022 11:45:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:breadcrumb=E7=BB=84=E4=BB=B6=E5=8E=BB?= =?UTF-8?q?=E9=99=A4=E5=B1=95=E5=B9=B3=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/breadcrumb/index.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/common/breadcrumb/index.tsx b/src/components/common/breadcrumb/index.tsx index 43792e5..32539db 100644 --- a/src/components/common/breadcrumb/index.tsx +++ b/src/components/common/breadcrumb/index.tsx @@ -3,12 +3,9 @@ import { useHistory } from 'react-router-dom' import withBreadcrumbs from 'react-router-breadcrumbs-hoc' import { Breadcrumb, Button } from 'antd' import routes from '@/route/routes' -import { flattenRoutes } from '@/assets/js/publicFunc' - -const allRoutes = flattenRoutes(routes) interface Props { - breadcrumbs: any[]; + breadcrumbs: any[] } // 通用面包屑 @@ -39,4 +36,4 @@ const Breadcrumbs: FC = ({ breadcrumbs }) => { ) } -export default withBreadcrumbs(allRoutes)(Breadcrumbs) +export default withBreadcrumbs(routes)(Breadcrumbs)