diff --git a/components/notification/index.tsx b/components/notification/index.tsx index ded1d41c78..97bbef6a7e 100755 --- a/components/notification/index.tsx +++ b/components/notification/index.tsx @@ -148,18 +148,19 @@ function notice(args) { }); } -const api: { - success?(args: ArgsProps): void; - error?(args: ArgsProps): void; - info?(args: ArgsProps): void; - warn?(args: ArgsProps): void; - warning?(args: ArgsProps): void; - +export interface NotificationApi { + success(args: ArgsProps): void; + error(args: ArgsProps): void; + info(args: ArgsProps): void; + warn(args: ArgsProps): void; + warning(args: ArgsProps): void; open(args: ArgsProps): void; close(key: string): void; config(options: ConfigProps): void; destroy(): void; -} = { +} + +const api = { open(args: ArgsProps) { notice(args); }, @@ -208,4 +209,4 @@ const api: { (api as any).warn = (api as any).warning; -export default api; +export default api as NotificationApi; diff --git a/components/table/Table.tsx b/components/table/Table.tsx index a3b435e437..a888f6896a 100755 --- a/components/table/Table.tsx +++ b/components/table/Table.tsx @@ -50,8 +50,8 @@ export type TableColumnConfig = ColumnProps; export interface TableRowSelection { type?: 'checkbox' | 'radio'; - selectedRowKeys?: string[]; - onChange?: (selectedRowKeys: string[], selectedRows: Object[]) => any; + selectedRowKeys?: string[] | number[]; + onChange?: (selectedRowKeys: string[] | number[], selectedRows: Object[]) => any; getCheckboxProps?: (record: T) => Object; onSelect?: (record: T, selected: boolean, selectedRows: Object[]) => any; onSelectAll?: (selected: boolean, selectedRows: Object[], changeRows: Object[]) => any; @@ -70,11 +70,11 @@ export interface TableProps { rowKey?: string | ((record: T, index: number) => string); rowClassName?: (record: T, index: number) => string; expandedRowRender?: any; - defaultExpandedRowKeys?: string[]; - expandedRowKeys?: string[]; + defaultExpandedRowKeys?: string[] | number[]; + expandedRowKeys?: string[] | number[]; expandIconAsCell?: boolean; expandIconColumnIndex?: number; - onExpandedRowsChange?: (expandedRowKeys: string[]) => void; + onExpandedRowsChange?: (expandedRowKeys: string[] | number[]) => void; onExpand?: (expanded: boolean, record: T) => void; onChange?: (pagination: PaginationProps | boolean, filters: string[], sorter: Object) => any; loading?: boolean | SpinProps;