ant-design / pro-components

🏆 Use Ant Design like a Pro!

Home Page:https://pro-components.antdigital.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🐛[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

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]

🚑 其他信息