diff --git a/components/breadcrumb/index.en-US.md b/components/breadcrumb/index.en-US.md index 706816c107..db86d5432a 100644 --- a/components/breadcrumb/index.en-US.md +++ b/components/breadcrumb/index.en-US.md @@ -31,10 +31,20 @@ The link of Breadcrumb item targets `#` by default, you can use `itemRender` to ```jsx import { Link } from 'react-router'; +const routes = [{ + path: 'index', +  breadcrumbName: 'home' +}, { + path: 'first', + breadcrumbName: 'first' +}, { + path: 'second', + breadcrumbName: 'second' +}]; function itemRender(route, params, routes, paths) { const last = routes.indexOf(route) === routes.length - 1; return last ? {route.breadcrumbName} : {route.breadcrumbName}; } -return ; +return ; ``` diff --git a/components/breadcrumb/index.zh-CN.md b/components/breadcrumb/index.zh-CN.md index 28e7bafecf..7ff46a4a09 100644 --- a/components/breadcrumb/index.zh-CN.md +++ b/components/breadcrumb/index.zh-CN.md @@ -31,10 +31,20 @@ title: Breadcrumb ```jsx import { Link } from 'react-router'; +const routes = [{ + path: 'index', + breadcrumbName: '首页' +}, { + path: 'first', + breadcrumbName: '一级面包屑' +}, { + path: 'second', + breadcrumbName: '当前页面' +}]; function itemRender(route, params, routes, paths) { const last = routes.indexOf(route) === routes.length - 1; return last ? {route.breadcrumbName} : {route.breadcrumbName}; } -return ; +return ; ```