UNPKG

1.28 kBTypeScriptView Raw
1/// <reference types="react" />
2import type { BreadcrumbProps } from 'antd';
3import type { WaterMarkProps } from '../components/WaterMark';
4import type { PureSettings } from '../defaultSettings';
5import type { MenuDataItem } from '../typing';
6import type { BreadcrumbListReturn } from '../utils/getBreadcrumbProps';
7export type RouteContextType = {
8 breadcrumb?: BreadcrumbListReturn;
9 menuData?: MenuDataItem[];
10 isMobile?: boolean;
11 prefixCls?: string;
12 collapsed?: boolean;
13 hasSiderMenu?: boolean;
14 hasHeader?: boolean;
15 siderWidth?: number;
16 isChildrenLayout?: boolean;
17 hasFooterToolbar?: boolean;
18 hasFooter?: boolean;
19 hasPageContainer?: number;
20 setHasFooterToolbar?: React.Dispatch<React.SetStateAction<boolean>>;
21 setHasPageContainer?: React.Dispatch<React.SetStateAction<number>>;
22 pageTitleInfo?: {
23 title: string;
24 id: string;
25 pageName: string;
26 };
27 matchMenus?: MenuDataItem[];
28 matchMenuKeys?: string[];
29 currentMenu?: PureSettings & MenuDataItem;
30 /** PageHeader 的 BreadcrumbProps 配置,会透传下去 */
31 breadcrumbProps?: BreadcrumbProps;
32 waterMarkProps?: WaterMarkProps;
33} & Partial<PureSettings>;
34export declare const RouteContext: React.Context<RouteContextType>;