category | type | title |
---|---|---|
Components |
Navigation |
Breadcrumb |
A breadcrumb displays the current location within a hierarchy. It allows going back to states higher up in the hierarchy.
Property | Description | Type | Optional | Default |
---|---|---|---|---|
itemRender | Custom item renderer | (route, params, routes, paths) => ReactNode | - | |
params | Routing parameters | object | - | |
routes | The routing stack information of router | object[] | - | |
separator | Custom separator | string|ReactNode | / |
Property | Description | Type | Optional | Default |
---|---|---|---|---|
separator | Separator customization | ReactNode | - | |
href | link address | string | - | |
overlay | Rendering in the drop-down box | object[] | - | |
dropdownProps | For details on the property configuration of the drop-down box, please see the dropdown of the basic component | DropDownProps | - | |
menuList | Configure the display of horizontal drop-down lists | object[] | - | |
ListProps | When using menulist rendering | object[] | - | |
onClick | Click to trigger the callback function | (e) => {} | - |
Property | Description | Type | Optional | Default |
---|---|---|---|---|
listItemName | List display text | string | - | |
href | link address | string | - | |
listChildren | You can get the display text and render the desired display | ({ listItemName, href }: { listItemName: string, href: string }) => React.ReactNode |
- | |
onClick | Click to trigger the callback function | (e) => {} | - |
The link of Breadcrumb item targets #
by default, you can use itemRender
to make a browserHistory
Link.
import { Link } from 'react-router';
const routes = [{
path: 'index',
breadcrumbName: 'home'
}, {
path: 'first',
breadcrumbName: 'first'
}, {
path: 'second',
breadcrumbName: 'second'
}];
function itemRender(route, params, routes, paths) {
const last = routes.indexOf(route) === routes.length - 1;
return last ? <span>{route.breadcrumbName}</span> : <Link to={paths.join('/')}>{route.breadcrumbName}</Link>;
}
return <Breadcrumb itemRender={itemRender} routes={routes} />;
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )