UNPKG

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