From 12761e83823ed7340ba1140a1465ef419ceb0952 Mon Sep 17 00:00:00 2001 From: douxc Date: Thu, 27 Feb 2020 11:00:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Breadcrumb=20=E9=BB=98=E8=AE=A4=E4=BD=BF?= =?UTF-8?q?=E7=94=A8path=E4=BD=9C=E4=B8=BA=E5=94=AF=E4=B8=80key=20(#21583)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Breadcrumb 默认使用path作为唯一key * update&submit jest snapshot --- components/breadcrumb/Breadcrumb.tsx | 4 ++-- .../breadcrumb/__tests__/__snapshots__/router.test.js.snap | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/breadcrumb/Breadcrumb.tsx b/components/breadcrumb/Breadcrumb.tsx index a76b712681..9d8ef53e4f 100755 --- a/components/breadcrumb/Breadcrumb.tsx +++ b/components/breadcrumb/Breadcrumb.tsx @@ -103,7 +103,7 @@ export default class Breadcrumb extends React.Component { overlay = ( {route.children.map(child => ( - + {itemRender(child, params, routes, this.addChildPath(paths, child.path, params))} ))} @@ -112,7 +112,7 @@ export default class Breadcrumb extends React.Component { } return ( - + {itemRender(route, params, routes, paths)} ); diff --git a/components/breadcrumb/__tests__/__snapshots__/router.test.js.snap b/components/breadcrumb/__tests__/__snapshots__/router.test.js.snap index 7c8a37e198..074fcf03a5 100644 --- a/components/breadcrumb/__tests__/__snapshots__/router.test.js.snap +++ b/components/breadcrumb/__tests__/__snapshots__/router.test.js.snap @@ -100,7 +100,7 @@ exports[`react router react router 3 1`] = ` @@ -121,7 +121,7 @@ exports[`react router react router 3 1`] = ` @@ -142,7 +142,7 @@ exports[`react router react router 3 1`] = `