Commit 79cc60ac authored by ι™ˆεΈ…'s avatar ι™ˆεΈ…

fix #4025 ,feat: home will be able to click

parent 81e86060
...@@ -8,6 +8,10 @@ import { urlToList } from '../_utils/pathTools'; ...@@ -8,6 +8,10 @@ import { urlToList } from '../_utils/pathTools';
// Render the Breadcrumb child node // Render the Breadcrumb child node
const itemRender = (route, params, routes, paths) => { const itemRender = (route, params, routes, paths) => {
const last = routes.indexOf(route) === routes.length - 1; const last = routes.indexOf(route) === routes.length - 1;
// if path is home, use Link。
if (route.path === '/') {
return <Link to={paths.join('/')}>{route.breadcrumbName}</Link>;
}
return last || !route.component ? ( return last || !route.component ? (
<span>{route.breadcrumbName}</span> <span>{route.breadcrumbName}</span>
) : ( ) : (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment