-
-
Notifications
You must be signed in to change notification settings - Fork 47k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: PageHeader support breadcrumbRender props #28723
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 87ad29c:
|
Size Change: +126 B (0%) Total Size: 789 kB
|
缺文档 |
Codecov Report
@@ Coverage Diff @@
## master #28723 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 393 393
Lines 7450 7457 +7
Branches 2149 2151 +2
=========================================
+ Hits 7450 7457 +7
Continue to review full report at Codecov.
|
@@ -20,6 +20,7 @@ PageHeader can be used to highlight the page topic, display important informatio | |||
| avatar | Avatar next to the title bar | [AvatarProps](/components/avatar/) | - | | | |||
| backIcon | Custom back icon, if false the back icon will not be displayed | ReactNode \| boolean | <ArrowLeft /> | | | |||
| breadcrumb | Breadcrumb configuration | [Breadcrumb](/components/breadcrumb/) | - | | | |||
| breadcrumbRender | Customize the content of the breadcrumb area | (props,dom)=>ReactNode | - | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- (props,dom)=>ReactNode
+ (props, dom) => ReactNode
少空格。
@@ -16,7 +16,8 @@ export interface PageHeaderProps { | |||
title?: React.ReactNode; | |||
subTitle?: React.ReactNode; | |||
style?: React.CSSProperties; | |||
breadcrumb?: BreadcrumbProps; | |||
breadcrumb?: BreadcrumbProps | JSX.Element; | |||
breadcrumbRender?: (props: PageHeaderProps, defaultDom: React.ReactNode) => React.ReactNode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breadcrumb 不能完全替代 breadcrumbRender 的话,breadcrumb={<div />}
也不需要支持了,感觉两者是重复的。之前我以为加强 breadcrumb 就不需要 breadcrumbRender 了。
[English Template / 英文模板]
🤔 这个变动的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
需要自定义 pageheader 的面包屑
📝 更新日志
breadcrumbRender
propsbreadcrumbRender
属性。☑️ 请求合并前的自查清单