style: model list buttons

This commit is contained in:
jialin
2025-03-12 10:43:59 +08:00
parent a7cfa05504
commit 5edbc1a7b5
24 changed files with 460 additions and 157 deletions
+24 -2
View File
@@ -6,11 +6,31 @@ import TableHeader from './header';
import './index.less';
import TableRow from './row';
interface ColumnProps {
export interface ColumnProps {
title: string;
key: string;
render?: (data: { dataIndex: string; row: any }) => any;
render?: (data: {
dataIndex: string;
dataList?: any[];
row: any;
rowIndex?: number;
colIndex?: number;
}) => any;
locale?: boolean;
colSpan?: (params: {
row: any;
rowIndex: number;
colIndex: number;
dataIndex: string;
dataList: any[];
}) => number;
rowSpan?: (params: {
row: any;
rowIndex: number;
colIndex: number;
dataIndex: string;
dataList: any[];
}) => number;
}
interface SimpleTableProps {
@@ -42,7 +62,9 @@ const SimpleTabel: React.FC<SimpleTableProps> = (props) => {
return (
<TableRow
row={item}
rowIndex={index}
columns={columns}
dataList={dataSource}
key={rowKey ? item[rowKey] : index}
></TableRow>
);