Commit 899950fb authored by 陈小聪's avatar 陈小聪 Committed by 陈帅

Components Typings (#3815)

* Trend

* TopNavHeader

* TagSelect

* SiderMenu

* SettingDrawer

* StandardTable

* StandardFormRow

* SelectLang

* Reault

* PageHeaderWrapper

* PageHeaderWrapper

* PageHeader

* NumberInfo

* NoticeIcon

* Login

* code style

* GlobalHeader Footer

* Exception

* Ellipsis

* EditableLinkGroup

* EditableItem

* DescriptionList

* AvticleList

* Update src/components/AvatarList/AvatarItem.d.ts
Co-Authored-By: default avatarxiaohuoni <xiaohuoni@users.noreply.github.com>

* Update src/components/Login/index.d.ts
Co-Authored-By: default avatarxiaohuoni <xiaohuoni@users.noreply.github.com>

* remove '* as'

* Update src/components/AvatarList/index.d.ts
Co-Authored-By: default avatarxiaohuoni <xiaohuoni@users.noreply.github.com>

* TagSelect

* SiderTheme CollapseType MenuMode

* Login
parent 8983d01b
import React from 'react';
export interface ApplicationsProps {
data: {
content?: string;
updatedAt?: any;
avatar?: string;
owner?: string;
href?: string;
};
}
export default class ArticleListContent extends React.Component<ApplicationsProps, any> {}
import * as React from 'react'; import React from 'react';
import { RouteProps } from 'react-router'; import { RouteProps } from 'react-router';
type authorityFN = (currentAuthority?: string) => boolean; type authorityFN = (currentAuthority?: string) => boolean;
......
import * as React from 'react'; import React from 'react';
import AuthorizedRoute, { authority } from './AuthorizedRoute'; import AuthorizedRoute, { authority } from './AuthorizedRoute';
export type IReactComponent<P = any> = export type IReactComponent<P = any> =
| React.StatelessComponent<P> | React.StatelessComponent<P>
......
import * as React from 'react'; import React from 'react';
export interface IAvatarItemProps {
export declare type SizeType = number | 'small' | 'default' | 'large';
export interface AvatarItemProps {
tips: React.ReactNode; tips: React.ReactNode;
src: string; src: string;
size?: SizeType;
style?: React.CSSProperties; style?: React.CSSProperties;
onClick?: () => void;
} }
export default class AvatarItem extends React.Component<IAvatarItemProps, any> { export default class AvatarItem extends React.Component<AvatarItemProps, any> {
constructor(props: IAvatarItemProps); constructor(props: AvatarItemProps);
} }
import * as React from 'react'; import React from 'react';
import AvatarItem from './AvatarItem'; import AvatarItem, { AvatarItemProps, SizeType } from './AvatarItem';
export interface IAvatarListProps { export interface AvatarListProps {
size?: 'large' | 'small' | 'mini' | 'default'; Item?: React.ReactElement<AvatarItemProps>;
size?: SizeType;
maxLength?: number; maxLength?: number;
excessItemsStyle?: React.CSSProperties; excessItemsStyle?: React.CSSProperties;
style?: React.CSSProperties; style?: React.CSSProperties;
children: React.ReactElement<AvatarItem> | Array<React.ReactElement<AvatarItem>>; children: React.ReactElement<AvatarItemProps> | Array<React.ReactElement<AvatarItemProps>>;
} }
export default class AvatarList extends React.Component<AvatarListProps, any> {
export default class AvatarList extends React.Component<IAvatarListProps, any> {
public static Item: typeof AvatarItem; public static Item: typeof AvatarItem;
} }
import * as React from 'react'; import React from 'react';
export interface IBarProps { export interface IBarProps {
title: React.ReactNode; title: React.ReactNode;
color?: string; color?: string;
......
import { CardProps } from 'antd/lib/card'; import { CardProps } from 'antd/lib/card';
import * as React from 'react'; import React from 'react';
export interface IChartCardProps extends CardProps { export interface IChartCardProps extends CardProps {
title: React.ReactNode; title: React.ReactNode;
......
import * as React from 'react'; import React from 'react';
export interface IFieldProps { export interface IFieldProps {
label: React.ReactNode; label: React.ReactNode;
value: React.ReactNode; value: React.ReactNode;
......
import * as React from 'react'; import React from 'react';
export interface IGaugeProps { export interface IGaugeProps {
title: React.ReactNode; title: React.ReactNode;
color?: string; color?: string;
......
import * as React from 'react'; import React from 'react';
// g2已经更新到3.0 // g2已经更新到3.0
// 不带的写了 // 不带的写了
......
import * as React from 'react'; import React from 'react';
export interface IMiniBarProps { export interface IMiniBarProps {
color?: string; color?: string;
height: number; height: number;
......
import * as React from 'react'; import React from 'react';
export interface IMiniProgressProps { export interface IMiniProgressProps {
target: number; target: number;
color?: string; color?: string;
......
import * as React from 'react'; import React from 'react';
export interface IPieProps { export interface IPieProps {
animate?: boolean; animate?: boolean;
color?: string; color?: string;
......
import * as React from 'react'; import React from 'react';
export interface IRadarProps { export interface IRadarProps {
title?: React.ReactNode; title?: React.ReactNode;
height: number; height: number;
......
import * as React from 'react'; import React from 'react';
export interface ITagCloudProps { export interface ITagCloudProps {
data: Array<{ data: Array<{
name: string; name: string;
......
import * as React from 'react'; import React from 'react';
export interface ITimelineChartProps { export interface ITimelineChartProps {
data: Array<{ data: Array<{
x: number; x: number;
......
import * as React from 'react'; import React from 'react';
export interface IWaterWaveProps { export interface IWaterWaveProps {
title: React.ReactNode; title: React.ReactNode;
color?: string; color?: string;
......
import * as React from 'react'; import React from 'react';
export interface ICountDownProps { export interface ICountDownProps {
format?: (time: number) => void; format?: (time: number) => void;
target: Date | number; target: Date | number;
......
import * as React from 'react'; import React from 'react';
import { ColProps } from 'antd/es/col';
export default class Description extends React.Component< export interface DescriptionProps extends ColProps {
{ column?: number;
term: React.ReactNode; key?: string | number;
style?: React.CSSProperties; style?: React.CSSProperties;
}, term?: React.ReactNode;
any }
> {}
export default class Description extends React.Component<DescriptionProps, any> {}
import * as React from 'react'; import React from 'react';
import Description from './Description'; import Description, { DescriptionProps } from './Description';
export interface IDescriptionListProps { export interface DescriptionListProps {
layout?: 'horizontal' | 'vertical'; className?: string;
col?: number; col?: number;
title: React.ReactNode; description?: DescriptionProps[];
gutter?: number; gutter?: number;
layout?: 'horizontal' | 'vertical';
size?: 'large' | 'small'; size?: 'large' | 'small';
style?: React.CSSProperties; style?: React.CSSProperties;
title?: React.ReactNode;
} }
export default class DescriptionList extends React.Component<IDescriptionListProps, any> { export default class DescriptionList extends React.Component<DescriptionListProps, any> {
public static Description: typeof Description; public static Description: typeof Description;
} }
import React from 'react';
export interface EditableItemProps {
onChange?: (value?: string | string[] | number) => void;
}
export default class EditableItem extends React.Component<EditableItemProps, any> {}
import React from 'react';
export interface EditableLinkGroupProps {
links: any[];
onAdd: () => void;
linkElement: string;
}
export default class EditableLinkGroup extends React.Component<EditableLinkGroupProps, any> {}
import * as React from 'react'; import React from 'react';
import { TooltipProps } from 'antd/lib/tooltip'; import { TooltipProps } from 'antd/lib/tooltip';
export interface IEllipsisTooltipProps extends TooltipProps { export interface EllipsisTooltipProps extends TooltipProps {
title?: undefined; title?: undefined;
overlayStyle?: undefined; overlayStyle?: undefined;
} }
export interface IEllipsisProps { export interface EllipsisProps {
tooltip?: boolean | IEllipsisTooltipProps; tooltip?: boolean | EllipsisTooltipProps;
length?: number; length?: number;
lines?: number; lines?: number;
style?: React.CSSProperties; style?: React.CSSProperties;
...@@ -18,4 +18,4 @@ export interface IEllipsisProps { ...@@ -18,4 +18,4 @@ export interface IEllipsisProps {
export function getStrFullLength(str: string): number; export function getStrFullLength(str: string): number;
export function cutStrByFullLength(str: string, maxLength: number): string; export function cutStrByFullLength(str: string, maxLength: number): string;
export default class Ellipsis extends React.Component<IEllipsisProps, any> {} export default class Ellipsis extends React.Component<EllipsisProps, any> {}
import * as React from 'react'; import React from 'react';
export interface IExceptionProps { import * as H from 'history';
export interface ExceptionProps<
L = {
to: H.LocationDescriptor;
href?: H.LocationDescriptor;
replace?: boolean;
innerRef?: (node: HTMLAnchorElement | null) => void;
}
> {
type?: '403' | '404' | '500'; type?: '403' | '404' | '500';
title?: React.ReactNode; title?: React.ReactNode;
desc?: React.ReactNode; desc?: React.ReactNode;
img?: string; img?: string;
actions?: React.ReactNode; actions?: React.ReactNode;
linkElement?: string | React.ComponentType; linkElement?: string | React.ComponentType<L>;
style?: React.CSSProperties; style?: React.CSSProperties;
className?: string; className?: string;
backText?: React.ReactNode; backText?: React.ReactNode;
redirect?: string; redirect?: string;
} }
export default class Exception extends React.Component<ExceptionProps, any> {}
export default class Exception extends React.Component<IExceptionProps, any> {}
import * as React from 'react'; import React from 'react';
export interface IFooterToolbarProps { export interface FooterToolbarProps {
extra: React.ReactNode; extra: React.ReactNode;
style?: React.CSSProperties; style?: React.CSSProperties;
className?: string;
} }
export default class FooterToolbar extends React.Component<IFooterToolbarProps, any> {} export default class FooterToolbar extends React.Component<FooterToolbarProps, any> {}
import * as React from 'react'; import React from 'react';
export interface IGlobalFooterProps { export interface GlobalFooterProps {
links?: Array<{ links?: Array<{
key?: string; key?: string;
title: React.ReactNode; title: React.ReactNode;
...@@ -8,6 +8,7 @@ export interface IGlobalFooterProps { ...@@ -8,6 +8,7 @@ export interface IGlobalFooterProps {
}>; }>;
copyright?: React.ReactNode; copyright?: React.ReactNode;
style?: React.CSSProperties; style?: React.CSSProperties;
className?: string;
} }
export default class GlobalFooter extends React.Component<IGlobalFooterProps, any> {} export default class GlobalFooter extends React.Component<GlobalFooterProps, any> {}
import React from 'react';
import { DropDownProps } from 'antd/lib/dropdown';
import { ClickParam } from 'antd/es/menu';
import { SiderTheme } from 'antd/es/Layout/Sider';
export interface GlobalHeaderRightProps {
notices?: any[];
dispatch?: (args: any) => void;
currentUser?: {
avatar?: string;
name?: string;
title?: string;
group?: string;
signature?: string;
geographic?: any;
tags?: any[];
unreadCount: number;
};
fetchingNotices?: boolean;
onNoticeVisibleChange?: (visible: boolean) => void;
onMenuClick?: (param: ClickParam) => void;
onNoticeClear?: (tabName: string) => void;
theme?: SiderTheme;
}
export default class GlobalHeaderRight extends React.Component<GlobalHeaderRightProps, any> {}
import React from 'react';
export interface GlobalHeaderProps {
collapsed?: boolean;
onCollapse?: (collapsed: boolean) => void;
isMobile?: boolean;
logo?: string;
onNoticeClear?: (type: string) => void;
onMenuClick?: ({ key: string }) => void;
onNoticeVisibleChange?: (b: boolean) => void;
}
export default class GlobalHeader extends React.Component<GlobalHeaderProps, any> {}
import * as React from 'react'; import React from 'react';
import { DropDownProps } from 'antd/lib/dropdown'; import { DropDownProps } from 'antd/lib/dropdown';
export interface IHeaderDropdownProps extends DropDownProps { declare type OverlayFunc = () => React.ReactNode;
export interface HeaderDropdownProps extends DropDownProps {
overlayClassName?: string; overlayClassName?: string;
overlay: React.ReactNode | OverlayFunc;
placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight' | 'bottomCenter';
} }
export default class HeaderDropdown extends React.Component<IHeaderDropdownProps, any> {} export default class HeaderDropdown extends React.Component<HeaderDropdownProps, any> {}
import * as React from 'react'; import React from 'react';
export interface IHeaderSearchProps { export interface HeaderSearchProps {
placeholder?: string; placeholder?: string;
dataSource?: string[]; dataSource?: string[];
defaultOpen?: boolean; defaultOpen?: boolean;
...@@ -12,4 +12,4 @@ export interface IHeaderSearchProps { ...@@ -12,4 +12,4 @@ export interface IHeaderSearchProps {
className?: string; className?: string;
} }
export default class HeaderSearch extends React.Component<IHeaderSearchProps, any> {} export default class HeaderSearch extends React.Component<HeaderSearchProps, any> {}
import * as React from 'react'; import React from 'react';
export interface ILoginItemProps { import { WrappedFormUtils } from 'antd/es/form/Form';
import ItemMap from './map';
import { Omit } from 'antd/es/_util/type';
export type WrappedLoginItemProps = Omit<LoginItemProps, 'form' | 'type' | 'updateActive'>;
export type LoginItemType = { [K in keyof typeof ItemMap]: React.FC<WrappedLoginItemProps> };
export interface LoginItemProps {
name?: string; name?: string;
rules?: any[]; rules?: any[];
style?: React.CSSProperties; style?: React.CSSProperties;
onGetCaptcha?: () => void; onGetCaptcha?: (event?: MouseEvent) => void;
placeholder?: string; placeholder?: string;
buttonText?: React.ReactNode; buttonText?: React.ReactNode;
onPressEnter?: (e: any) => void;
countDown?: number;
getCaptchaButtonText?: string;
getCaptchaSecondText?: string;
updateActive: (activeItem: any) => void;
form: WrappedFormUtils;
type: string;
defaultValue?: string;
customprops?: any;
onChange?: (e: any) => void;
} }
export default class LoginItem extends React.Component<ILoginItemProps, any> {} export default class LoginItem extends React.Component<LoginItemProps, any> {}
import * as React from 'react'; import React from 'react';
export interface ILoginTabProps { export interface LoginTabProps {
key?: string; key?: string;
tab?: React.ReactNode; tab?: React.ReactNode;
tabUtil: {
addTab: (id: any) => void;
removeTab: (id: any) => void;
};
} }
export default class LoginTab extends React.Component<ILoginTabProps, any> {} export default class LoginTab extends React.Component<LoginTabProps, any> {}
import Button from 'antd/lib/button'; import Button from 'antd/lib/button';
import * as React from 'react'; import React from 'react';
import LoginItem from './LoginItem'; import LoginItem, { LoginItemProps, LoginItemType } from './LoginItem';
import LoginTab from './LoginTab'; import LoginTab from './LoginTab';
import { WrappedFormUtils } from 'antd/es/form/Form';
import LoginSubmit from './LoginSubmit';
export interface ILoginProps { export interface LoginProps {
defaultActiveKey?: string; defaultActiveKey?: string;
onTabChange?: (key: string) => void; onTabChange?: (key: string) => void;
style?: React.CSSProperties; style?: React.CSSProperties;
onSubmit?: (error: any, values: any) => void; onSubmit?: (error: any, values: any) => void;
className?: string;
} }
export default class Login extends React.Component<ILoginProps, any> { interface Login extends WrappedFormUtils {}
declare class Login extends React.Component<LoginProps, any> {
public static Tab: typeof LoginTab; public static Tab: typeof LoginTab;
public static UserName: typeof LoginItem; public static UserName: React.FC<LoginItemProps>;
public static Password: typeof LoginItem; public static Password: React.FC<LoginItemProps>;
public static Mobile: typeof LoginItem; public static Mobile: React.FC<LoginItemProps>;
public static Captcha: typeof LoginItem; public static Captcha: React.FC<LoginItemProps>;
public static Submit: typeof Button; public static Submit: typeof LoginSubmit;
} }
export default Login;
import { SkeletonProps } from 'antd/lib/skeleton'; import { SkeletonProps } from 'antd/lib/skeleton';
import * as React from 'react'; import React from 'react';
export interface INoticeIconData { export interface NoticeIconData {
avatar?: string | React.ReactNode; avatar?: string | React.ReactNode;
title?: React.ReactNode; title?: React.ReactNode;
description?: React.ReactNode; description?: React.ReactNode;
...@@ -10,16 +10,21 @@ export interface INoticeIconData { ...@@ -10,16 +10,21 @@ export interface INoticeIconData {
style?: React.CSSProperties; style?: React.CSSProperties;
} }
export interface INoticeIconTabProps { export interface NoticeIconTabProps {
count?: number; count?: number;
emptyText?: React.ReactNode; emptyText?: React.ReactNode;
emptyImage?: string; emptyImage?: string;
list?: INoticeIconData[]; list?: NoticeIconData[];
name?: string; name?: string;
showClear?: boolean; showClear?: boolean;
showViewMore?: boolean; showViewMore?: boolean;
style?: React.CSSProperties; style?: React.CSSProperties;
title?: string; title?: string;
data?: any[];
onClick: (item: any) => void;
onClear: (item: any) => void;
locale: any;
onViewMore: (e: any) => void;
} }
export default class NoticeIconTab extends React.Component<INoticeIconTabProps, any> {} export default class NoticeIconTab extends React.Component<NoticeIconTabProps, any> {}
import * as React from 'react'; import React from 'react';
import NoticeIconTab, { INoticeIconData } from './NoticeIconTab'; import NoticeIconTab, { NoticeIconData } from './NoticeIconTab';
export interface INoticeIconProps { export interface NoticeIconProps {
count?: number; count?: number;
bell?: React.ReactNode; bell?: React.ReactNode;
className?: string; className?: string;
loading?: boolean; loading?: boolean;
onClear?: (tabName: string) => void; onClear?: (tabName: string) => void;
onItemClick?: (item: INoticeIconData, tabProps: INoticeIconProps) => void; onItemClick?: (item: NoticeIconData, tabProps: NoticeIconProps) => void;
onViewMore?: (tabProps: INoticeIconProps) => void; onViewMore?: (tabProps: NoticeIconProps, e: MouseEvent) => void;
onTabChange?: (tabTile: string) => void; onTabChange?: (tabTile: string) => void;
style?: React.CSSProperties; style?: React.CSSProperties;
onPopupVisibleChange?: (visible: boolean) => void; onPopupVisibleChange?: (visible: boolean) => void;
...@@ -22,6 +22,6 @@ export interface INoticeIconProps { ...@@ -22,6 +22,6 @@ export interface INoticeIconProps {
clearClose?: boolean; clearClose?: boolean;
} }
export default class NoticeIcon extends React.Component<INoticeIconProps, any> { export default class NoticeIcon extends React.Component<NoticeIconProps, any> {
public static Tab: typeof NoticeIconTab; public static Tab: typeof NoticeIconTab;
} }
import * as React from 'react'; import React from 'react';
export interface INumberInfoProps { export interface NumberInfoProps {
title?: React.ReactNode | string; title?: React.ReactNode | string;
subTitle?: React.ReactNode | string; subTitle?: React.ReactNode | string;
total?: React.ReactNode | string; total?: React.ReactNode | string;
...@@ -7,7 +7,8 @@ export interface INumberInfoProps { ...@@ -7,7 +7,8 @@ export interface INumberInfoProps {
theme?: string; theme?: string;
gap?: number; gap?: number;
subTotal?: number; subTotal?: number;
suffix?: string;
style?: React.CSSProperties; style?: React.CSSProperties;
} }
export default class NumberInfo extends React.Component<INumberInfoProps, any> {} export default class NumberInfo extends React.Component<NumberInfoProps, any> {}
import * as React from 'react'; import React from 'react';
import { IPageHeaderProps } from './index'; import { PageHeaderProps } from './index';
export default class BreadcrumbView extends React.Component<IPageHeaderProps, any> {} export default class BreadcrumbView extends React.Component<PageHeaderProps, any> {}
export function getBreadcrumb(breadcrumbNameMap: object, url: string): object; export function getBreadcrumb(breadcrumbNameMap: object, url: string): object;
/// <reference types="history" /> import React from 'react';
import * as 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> {}
import React from 'react';
export interface GridContentProps {
contentWidth: string;
children: React.ReactNode;
}
export default class GridContent extends React.Component<GridContentProps, any> {}
import React from 'react';
export interface ResultProps {
actions?: React.ReactNode;
className?: string;
description?: React.ReactNode;
extra?: React.ReactNode;
style?: React.CSSProperties;
title?: React.ReactNode;
type: 'success' | 'error';
}
export default class Result extends React.Component<ResultProps, any> {}
import * as React from 'react'; import React from 'react';
export interface IResultProps { export interface ResultProps {
type: 'success' | 'error'; actions?: React.ReactNode;
title: React.ReactNode; className?: string;
description?: React.ReactNode; description?: React.ReactNode;
extra?: React.ReactNode; extra?: React.ReactNode;
actions?: React.ReactNode;
style?: React.CSSProperties; style?: React.CSSProperties;
title?: React.ReactNode;
type: 'success' | 'error';
} }
export default class Result extends React.Component<IResultProps, any> {} export default class Result extends React.Component<ResultProps, any> {}
import React from 'react';
export interface SelectLangProps {
className?: string;
}
export default class SelectLang extends React.Component<SelectLangProps, any> {}
import React from 'react';
export interface BlockChecboxProps {
value: string;
onChange: (key: string) => void;
list: any[];
}
export default class BlockChecbox extends React.Component<BlockChecboxProps, any> {}
import React from 'react';
export interface TagProps {
color: string;
check: boolean;
className?: string;
onClick?: () => void;
}
export default class ThemeColor extends React.Component<TagProps, any> {}
import React from 'react';
import { SiderTheme } from 'antd/es/Layout/Sider';
export interface SettingModelState {
navTheme: string | SiderTheme;
primaryColor: string;
layout: string;
contentWidth: string;
fixedHeader: boolean;
autoHideHeader: boolean;
fixSiderbar: boolean;
menu: { disableLocal: boolean };
title: string;
pwa: boolean;
iconfontUrl: string;
colorWeak: boolean;
}
export interface SettingDrawerProps {
setting?: SettingModelState;
dispatch?: (args: any) => void;
}
export default class SettingDrawer extends React.Component<SettingDrawerProps, any> {}
import React from 'react';
import * as H from 'history';
import { SiderTheme, CollapseType } from 'antd/es/Layout/Sider';
import { MenuMode } from 'antd/es/menu';
export interface BaseMenuProps {
flatMenuKeys?: any[];
location?: H.Location;
onCollapse?: (collapsed: boolean, type?: CollapseType) => void;
isMobile?: boolean;
openKeys?: any;
theme?: SiderTheme;
mode?: MenuMode;
className?: string;
collapsed?: boolean;
handleOpenChange?: (openKeys: any[]) => void;
menuData?: any[];
style?: React.CSSProperties;
onOpenChange?: (openKeys: string[]) => void;
}
export default class BaseMenu extends React.Component<BaseMenuProps, any> {}
import React from 'react';
import * as H from 'history';
import { BaseMenuProps } from './BaseMenu';
import { SiderTheme } from 'antd/es/Layout/Sider';
export interface SiderMenuProps extends BaseMenuProps {
logo?: string;
fixSiderbar?: boolean;
}
export default class SiderMenu extends React.Component<SiderMenuProps, any> {}
import React from 'react';
import { SiderTheme } from 'antd/es/Layout/Sider';
export interface SiderMenuProps {
isMobile: boolean;
menuData: any[];
collapsed: boolean;
logo?: string;
theme?: SiderTheme;
onCollapse: (payload: boolean) => void;
}
export default class SiderMenuWrapper extends React.Component<SiderMenuProps, any> {}
import React from 'react';
export interface StandardFormRowProps {
title: string;
last?: boolean;
block?: boolean;
grid?: boolean;
style?: React.CSSProperties;
}
export default class StandardFormRow extends React.Component<StandardFormRowProps, any> {}
import React from 'react';
import { PaginationConfig, SorterResult, TableCurrentDataSource } from 'antd/lib/table';
export interface StandardTableProps {
columns: any;
onSelectRow: (row: any) => void;
data: any;
rowKey?: string;
selectedRows: any[];
onChange?: (
pagination: PaginationConfig,
filters: Record<keyof any, string[]>,
sorter: SorterResult<any>,
extra?: TableCurrentDataSource<any>
) => void;
loading?: boolean;
}
export default class StandardTable extends React.Component<StandardTableProps, any> {}
import * as React from 'react'; import React from 'react';
export interface ITagSelectOptionProps { export interface TagSelectOptionProps {
value: string | number; value?: string | number;
style?: React.CSSProperties; style?: React.CSSProperties;
checked?: boolean;
onChange?: (value: string | number, state: boolean) => void;
} }
export default class TagSelectOption extends React.Component<ITagSelectOptionProps, any> {} export default class TagSelectOption extends React.Component<TagSelectOptionProps, any> {
public static isTagSelectOption?: boolean;
}
import * as React from 'react'; import React from 'react';
import TagSelectOption from './TagSelectOption'; import TagSelectOption, { TagSelectOptionProps } from './TagSelectOption';
export interface ITagSelectProps { export interface TagSelectProps {
onChange?: (value: string[]) => void; onChange?: (value: string[]) => void;
expandable?: boolean; expandable?: boolean;
value?: string[] | number[]; value?: string[] | number[];
style?: React.CSSProperties; style?: React.CSSProperties;
hideCheckAll?: boolean; hideCheckAll?: boolean;
actionsText?: { expandText?: string; collapseText?: string; selectAllText?: string }; actionsText?: {
expandText?: React.ReactNode;
collapseText?: React.ReactNode;
selectAllText?: React.ReactNode;
};
className: string;
Option: TagSelectOptionProps;
children: React.ReactElement<TagSelectOption> | Array<React.ReactElement<TagSelectOption>>;
} }
export default class TagSelect extends React.Component<ITagSelectProps, any> { export default class TagSelect extends React.Component<TagSelectProps, any> {
public static Option: typeof TagSelectOption; public static Option: typeof TagSelectOption;
private children: private children:
| React.ReactElement<TagSelectOption> | React.ReactElement<TagSelectOption>
......
import React from 'react';
import { SiderTheme, CollapseType } from 'antd/es/Layout/Sider';
import { MenuMode } from 'antd/es/menu';
export interface TopNavHeaderProps {
theme: SiderTheme;
contentWidth?: string;
menuData?: any[];
logo?: string;
mode?: MenuMode;
flatMenuKeys?: any[];
onCollapse?: (collapsed: boolean, type?: CollapseType) => void;
isMobile?: boolean;
openKeys?: any;
className?: string;
collapsed?: boolean;
handleOpenChange?: (openKeys: any[]) => void;
style?: React.CSSProperties;
onOpenChange?: (openKeys: string[]) => void;
onNoticeClear?: (type: string) => void;
onMenuClick?: ({ key: string }) => void;
onNoticeVisibleChange?: (b: boolean) => void;
}
export default class TopNavHeader extends React.Component<TopNavHeaderProps, any> {}
import * as React from 'react'; import React from 'react';
export interface ITrendProps { export interface ITrendProps {
colorful?: boolean; colorful?: boolean;
flag: 'up' | 'down'; flag: 'up' | 'down';
style?: React.CSSProperties; style?: React.CSSProperties;
reverseColor?: boolean; reverseColor?: boolean;
className?: string;
} }
export default class Trend extends React.Component<ITrendProps, any> {} export default class Trend extends React.Component<ITrendProps, any> {}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment