|
@@ -1,28 +1,31 @@
|
|
|
-/// <reference types="history" />
|
|
|
|
|
-import * as React from 'react';
|
|
|
|
|
|
|
+import React from 'react';
|
|
|
import { Location } from 'history';
|
|
import { Location } from 'history';
|
|
|
-export interface IPageHeaderProps {
|
|
|
|
|
- title?: React.ReactNode | string;
|
|
|
|
|
|
|
+
|
|
|
|
|
+export interface PageHeaderProps {
|
|
|
|
|
+ title?: React.ReactNode | string | number;
|
|
|
logo?: React.ReactNode | string;
|
|
logo?: React.ReactNode | string;
|
|
|
action?: React.ReactNode | string;
|
|
action?: React.ReactNode | string;
|
|
|
content?: React.ReactNode;
|
|
content?: React.ReactNode;
|
|
|
extraContent?: React.ReactNode;
|
|
extraContent?: React.ReactNode;
|
|
|
routes?: any[];
|
|
routes?: any[];
|
|
|
params?: any;
|
|
params?: any;
|
|
|
- breadcrumbList?: Array<{ title: React.ReactNode; href?: string }>;
|
|
|
|
|
|
|
+ breadcrumbList?: Array<{ title: string | number; href?: string }>;
|
|
|
tabList?: Array<{ key: string; tab: React.ReactNode }>;
|
|
tabList?: Array<{ key: string; tab: React.ReactNode }>;
|
|
|
tabActiveKey?: string;
|
|
tabActiveKey?: string;
|
|
|
tabDefaultActiveKey?: string;
|
|
tabDefaultActiveKey?: string;
|
|
|
onTabChange?: (key: string) => void;
|
|
onTabChange?: (key: string) => void;
|
|
|
tabBarExtraContent?: React.ReactNode;
|
|
tabBarExtraContent?: React.ReactNode;
|
|
|
- linkElement?: React.ReactNode;
|
|
|
|
|
|
|
+ linkElement?: React.ReactNode | string;
|
|
|
style?: React.CSSProperties;
|
|
style?: React.CSSProperties;
|
|
|
home?: React.ReactNode;
|
|
home?: React.ReactNode;
|
|
|
wide?: boolean;
|
|
wide?: boolean;
|
|
|
hiddenBreadcrumb?: boolean;
|
|
hiddenBreadcrumb?: boolean;
|
|
|
|
|
+ className?: string;
|
|
|
|
|
+ loading?: boolean;
|
|
|
|
|
+ breadcrumbSeparator?: React.ReactNode;
|
|
|
location?: Location;
|
|
location?: Location;
|
|
|
itemRender: (menuItem: any) => React.ReactNode;
|
|
itemRender: (menuItem: any) => React.ReactNode;
|
|
|
breadcrumbNameMap?: any;
|
|
breadcrumbNameMap?: any;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export default class PageHeader extends React.Component<IPageHeaderProps, any> {}
|
|
|
|
|
|
|
+export default class PageHeader extends React.Component<PageHeaderProps, any> {}
|