-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
fix: 修复面包屑的最后项的跳转以及颜色 #11140
fix: 修复面包屑的最后项的跳转以及颜色 #11140
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
7654213
to
fe96b39
Compare
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #11140 +/- ##
==========================================
- Coverage 29.14% 29.12% -0.03%
==========================================
Files 479 479
Lines 14424 14435 +11
Branches 3395 3399 +4
==========================================
Hits 4204 4204
- Misses 9492 9501 +9
- Partials 728 730 +2
☔ View full report in Codecov by Sentry. |
老哥 merge一下 |
fe96b39
to
1de0617
Compare
可能是你的分支需要重新拉,因为我是强推的... |
啊哈,get
咲奈Sakina ***@***.***>于2023年5月19日 周五02:03写道:
… ***@***.**** commented on this pull request.
------------------------------
In packages/plugins/src/layout.ts
<#11140 (comment)>:
> @@ -270,7 +270,14 @@ const { formatMessage } = useIntl();
}
return defaultDom;
}}
- itemRender={(route) => <Link to={route.path}>{route.breadcrumbName}</Link>}
+ itemRender={(route, { routes = [] }) => {
+ const { breadcrumbName, title, path } = route;
+ const last = routes.indexOf(route) === routes.length - 1;
+ if (last) {
+ return <span>{title || breadcrumbName}</span>;
+ }
+ return <Link to={route.path}>{route.breadcrumbName}</Link>
你创建一个新的 max 项目,而不是 ant pro 项目,使用如上我给出的路由表,是没有修复成功的,永远匹配不到 last
,这个修复要对所有场景都修复,不只是 ant pro ,你可以创建了看下。
—
Reply to this email directly, view it on GitHub
<#11140 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMAUEE6ECMELBDUUD2GJYCLXGZP75ANCNFSM6AAAAAAX7BKAAM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
2aa2dac
to
f29646c
Compare
bug-breadcrumb-link demo 可以精简一点,能复现问题就行,没必要复制一份 pro ,修改文件太多了,看不出干了啥 |
f29646c
to
e25642f
Compare
已经改好了 |
okok |
e25642f
to
025df9a
Compare
👌
咲奈Sakina ***@***.***>于2023年5月23日 周二21:35写道:
… ***@***.**** commented on this pull request.
------------------------------
In packages/plugins/src/layout.ts
<#11140 (comment)>:
> @@ -270,7 +270,14 @@ const { formatMessage } = useIntl();
}
return defaultDom;
}}
- itemRender={(route) => <Link to={route.path}>{route.breadcrumbName}</Link>}
+ itemRender={(route, _, routes) => {
+ const { breadcrumbName, title, path } = route;
+ const last = routes.map(item => (item.path ?? item.linkPath)).indexOf(path) === routes.length - 1;
改的不错,这个地方逻辑要优化下:
const label = title || breadcrumbName
const last = routes[routes.length - 1]
if (last) {
if (last.path === path || last.linkPath === path) {
// return ...
}
}
—
Reply to this email directly, view it on GitHub
<#11140 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMAUEE6J5AGVXGAICHVP62LXHS4IPANCNFSM6AAAAAAX7BKAAM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
0f0f649
to
cf3746f
Compare
cf3746f
to
42110f1
Compare
No description provided.