-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(components,website): 重构Breadcrumb组件
affects: @gio-design/components, website
- Loading branch information
1 parent
6467661
commit df27b8f
Showing
6 changed files
with
57 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/components/src/components/breadcrumb/BreadcrumbSeparator.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,4 +30,7 @@ | |
padding: 0 8px; | ||
text-align: center; | ||
} | ||
& > span:last-child &-separator { | ||
display: none; | ||
} | ||
} |
28 changes: 19 additions & 9 deletions
28
packages/website/src/components/basic/breadcrumb/demo/basic.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,35 @@ | ||
import * as React from 'react'; | ||
import { Breadcrumb } from '@gio-design/components'; | ||
import Breadcrumb from '@gio-design/components/es/components/breadcrumb'; | ||
import '@gio-design/components/es/components/breadcrumb/style/css.js'; | ||
|
||
export default () => { | ||
const routes = [ | ||
{ | ||
path: 'index', | ||
path: 'components', | ||
breadcrumbName: '首页', | ||
onClick: () => { | ||
alert('首页'); | ||
}, | ||
}, | ||
{ | ||
path: 'basic', | ||
breadcrumbName: '一级面包屑', | ||
onClick: () => { | ||
alert('一级面包屑'); | ||
}, | ||
}, | ||
{ | ||
path: 'breadcrumb', | ||
breadcrumbName: '二级面包屑', | ||
}, | ||
]; | ||
return <Breadcrumb routes={routes} />; | ||
return ( | ||
<div> | ||
<Breadcrumb routes={routes} /> | ||
<Breadcrumb> | ||
<Breadcrumb.Item>首页</Breadcrumb.Item> | ||
<Breadcrumb.Item> | ||
<a href="/components/basic/breadcrumb">一级面包屑</a> | ||
</Breadcrumb.Item> | ||
<Breadcrumb.Item> | ||
<a href="breadcrumb">二级面包屑</a> | ||
</Breadcrumb.Item> | ||
<Breadcrumb.Item>三级面包屑</Breadcrumb.Item> | ||
</Breadcrumb> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters