🐛[BUG] PageHeader 没有正确处理 breadcrumb.routes 参数
ChuChencheng opened this issue · comments
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
🐛 bug 描述
PageHeader 没有正确处理 breadcrumb.routes
导致面包屑空白
![image](https://private-user-images.githubusercontent.com/9395932/339345069-928214f9-41fe-47a1-8e2f-13eb19ed71d5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMzMTU0MTcsIm5iZiI6MTcyMzMxNTExNywicGF0aCI6Ii85Mzk1OTMyLzMzOTM0NTA2OS05MjgyMTRmOS00MWZlLTQ3YTEtOGUyZi0xM2ViMTllZDcxZDUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MTBUMTgzODM3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDA5NmY5ZTZmNTk1MmMwOThiODViNGYyMDU0NjBhNjU5YWNjMzg4NDk4MDY5MDIwZjIxYzA1NTY1MjlkNTE3YiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.sPCxMg1olMAYUqny3AbCwwCBfnnGMYosgbc1UBLEvUo)
breadcrumb.items
中并不存在 breadcrumbName
字段,不能直接赋值
📷 复现步骤
<PageHeader
title="routes"
breadcrumb={{
routes: [
{
path: 'test1',
breadcrumbName: 'test1',
},
{
path: 'test2',
breadcrumbName: 'test2',
children: [
{
path: 'test4',
breadcrumbName: 'test4',
},
],
},
{
path: 'test3',
breadcrumbName: 'test3',
},
],
}}
/>
🏞 期望结果
传入 breadcrumb.routes
面包屑正常显示
💻 复现代码
https://stackblitz.com/edit/react-wh7j5p?file=App.tsx
© 版本信息
- ProComponents 版本: 2.7.10
- umi 版本
- 浏览器环境
- 开发环境 [e.g. mac OS]