UNPKG

1.07 kBTypeScriptView Raw
1import type { ProSettings } from './defaultSettings';
2import type { MenuDataItem } from './typing';
3type BreadcrumbItem = Omit<MenuDataItem, 'children' | 'routes'> & {
4 routes?: BreadcrumbItem;
5};
6export declare const matchParamsPath: (pathname: string, breadcrumb?: Record<string, BreadcrumbItem>, breadcrumbMap?: Map<string, BreadcrumbItem>) => BreadcrumbItem;
7export type GetPageTitleProps = {
8 pathname?: string;
9 breadcrumb?: Record<string, BreadcrumbItem>;
10 breadcrumbMap?: Map<string, BreadcrumbItem>;
11 menu?: ProSettings['menu'];
12 title?: ProSettings['title'];
13 pageName?: string;
14 formatMessage?: (data: {
15 id: any;
16 defaultMessage?: string;
17 }) => string;
18};
19/**
20 * 获取关于 pageTitle 的所有信息方便包装
21 *
22 * @param props
23 * @param ignoreTitle
24 */
25export declare const getPageTitleInfo: (props: GetPageTitleProps, ignoreTitle?: boolean) => {
26 title: string;
27 id: string;
28 pageName: string;
29};
30export declare const getPageTitle: (props: GetPageTitleProps, ignoreTitle?: boolean) => string;
31export {};