1 | import type H from 'history';
|
2 | import type { BreadcrumbProps as AntdBreadcrumbProps } from 'antd';
|
3 | import type { ProSettings } from '../defaultSettings';
|
4 | import type { MenuDataItem, MessageDescriptor, WithFalse } from '../typings';
|
5 | import type { BasicLayoutProps } from '../BasicLayout';
|
6 | export declare type BreadcrumbProps = {
|
7 | breadcrumbList?: {
|
8 | title: string;
|
9 | href: string;
|
10 | }[];
|
11 | home?: string;
|
12 | location?: H.Location | {
|
13 | pathname?: string;
|
14 | };
|
15 | menu?: ProSettings['menu'];
|
16 | breadcrumbMap?: Map<string, MenuDataItem>;
|
17 | formatMessage?: (message: MessageDescriptor) => string;
|
18 | breadcrumbRender?: WithFalse<(routers: AntdBreadcrumbProps['routes']) => AntdBreadcrumbProps['routes']>;
|
19 | itemRender?: AntdBreadcrumbProps['itemRender'];
|
20 | };
|
21 | export declare const getBreadcrumb: (breadcrumbMap: Map<string, MenuDataItem>, url: string) => MenuDataItem;
|
22 | export declare const getBreadcrumbFromProps: (props: BreadcrumbProps) => {
|
23 | location: BreadcrumbProps['location'];
|
24 | breadcrumbMap: BreadcrumbProps['breadcrumbMap'];
|
25 | };
|
26 | export declare type BreadcrumbListReturn = Pick<AntdBreadcrumbProps, Extract<keyof AntdBreadcrumbProps, 'routes' | 'itemRender'>>;
|
27 |
|
28 | export declare const genBreadcrumbProps: (props: BreadcrumbProps) => AntdBreadcrumbProps['routes'];
|
29 | export declare const getBreadcrumbProps: (props: BreadcrumbProps, layoutPros: BasicLayoutProps) => BreadcrumbListReturn;
|