Skip to content

Commit

Permalink
chore(Table): 添加表格默认类型 (#659)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuilanxin committed Mar 14, 2022
1 parent e2e6cc8 commit 6871002
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-table/src/index.tsx
Expand Up @@ -4,7 +4,7 @@ import Thead from './Thead';
import { getLevelItems, getAllColumnsKeys } from './util';
import './style/index.less';

export type TableColumns<T extends { [key: string]: V }, V = any> = {
export type TableColumns<T = any, V = any> = {
title?: string | ((data: TableColumns<T, V>, rowNum: number, colNum: number) => JSX.Element) | JSX.Element;
key?: string;
width?: number;
Expand All @@ -16,7 +16,7 @@ export type TableColumns<T extends { [key: string]: V }, V = any> = {
[key: string]: any;
};

export interface TableProps<T extends { [key: string]: V }, V> extends IProps, Omit<HTMLDivProps, 'title'> {
export interface TableProps<T extends { [key: string]: V } = any, V = any> extends IProps, Omit<HTMLDivProps, 'title'> {
prefixCls?: string;
columns?: TableColumns<T, V>[];
data?: Array<T>;
Expand Down

0 comments on commit 6871002

Please sign in to comment.