这是一个创建于 862 天前的主题,其中的信息可能已经有所发展或是发生改变。
使用技术 react + antd +TS
const columns: ColumnsType<DataType> = [
{
title: "创建者",
dataIndex: "creator",
key: "creator",
},
.....]
<Table
columns={columns}
dataSource={analogDataTable(columns)}
/>
// 这是一个自定义通用模拟表格数据的方法
export const analogDataTable = (columns: (请问这里该如何定义类型?)) => {.......}
2 条回复 • 2022-06-13 17:47:02 +08:00
|
|
1
RNAer 2022-06-13 17:29:02 +08:00
ColumnsType<DataType>
|
|
|
2
iidear2015 2022-06-13 17:47:02 +08:00
<T>(x: ColumnsType<T>) => ColumnsType<T>
|