fix(group): 分组页面包屑与详情页统一
分组页改用 @stash/ui 的 Breadcrumb,去掉带边框的按钮样式和独立分隔符
This commit is contained in:
@@ -358,17 +358,6 @@
|
|||||||
margin-top: var(--su-space-4);
|
margin-top: var(--su-space-4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.group-crumbs {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: var(--su-space-2);
|
|
||||||
padding: var(--su-space-2) var(--su-space-3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.group-crumb-sep {
|
|
||||||
color: var(--su-text-muted);
|
|
||||||
}
|
|
||||||
|
|
||||||
.group-child-block {
|
.group-child-block {
|
||||||
margin-top: var(--su-space-2);
|
margin-top: var(--su-space-2);
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-17
@@ -1,4 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
|
Breadcrumb,
|
||||||
Empty,
|
Empty,
|
||||||
EngineIcon,
|
EngineIcon,
|
||||||
Layout,
|
Layout,
|
||||||
@@ -606,23 +607,17 @@ export default function AppNext() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="detail-view">
|
<div className="detail-view">
|
||||||
<nav className="detail-breadcrumb group-crumbs">
|
<Breadcrumb
|
||||||
<button type="button" className="link-button" onClick={() => navigate('/')}>
|
className="detail-breadcrumb"
|
||||||
首页
|
items={[
|
||||||
</button>
|
{ label: '首页', href: '/' },
|
||||||
{trail.map((node) => (
|
...trail.map((node) => ({
|
||||||
<span key={node.key}>
|
label: node.title,
|
||||||
<span className="group-crumb-sep">/</span>
|
href: `/g/${encodeURIComponent(node.key)}`,
|
||||||
<button
|
})),
|
||||||
type="button"
|
]}
|
||||||
className="link-button"
|
onNavigate={navigate}
|
||||||
onClick={() => navigate(`/g/${encodeURIComponent(node.key)}`)}
|
/>
|
||||||
>
|
|
||||||
{node.title}
|
|
||||||
</button>
|
|
||||||
</span>
|
|
||||||
))}
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<div className="detail-hero">
|
<div className="detail-hero">
|
||||||
<span className="detail-hero-icon" aria-hidden="true">
|
<span className="detail-hero-icon" aria-hidden="true">
|
||||||
|
|||||||
Reference in New Issue
Block a user