You've already forked DataMate
feat(data-annotation): 添加表格序号列并移除任务ID列
- 添加序号列显示当前页码计算后的行号 - 移除原有的任务ID列 - 序号列居中对齐宽度为80px - 序号基于当前页码和页面大小动态计算 - 保持表格
This commit is contained in:
@@ -155,17 +155,23 @@ export default function DataAnnotation() {
|
||||
];
|
||||
|
||||
const columns: ColumnType<AnnotationTaskListItem>[] = [
|
||||
{
|
||||
title: "序号",
|
||||
key: "index",
|
||||
width: 80,
|
||||
align: "center" as const,
|
||||
render: (_value: unknown, _record: AnnotationTaskListItem, index: number) => {
|
||||
const current = pagination.current ?? 1;
|
||||
const pageSize = pagination.pageSize ?? tableData.length ?? 0;
|
||||
return (current - 1) * pageSize + index + 1;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "任务名称",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
fixed: "left" as const,
|
||||
},
|
||||
{
|
||||
title: "任务ID",
|
||||
dataIndex: "id",
|
||||
key: "id",
|
||||
},
|
||||
{
|
||||
title: "数据集",
|
||||
dataIndex: "datasetName",
|
||||
|
||||
Reference in New Issue
Block a user