You've already forked DataMate
refactor(template): 移除模板列表中的类型、版本和操作列
- 移除了类型列(内置/自定义标签显示) - 移除了版本列 - 移除了操作列(查看、编辑、删除按钮) - 保留了创建时间列并维持其渲染逻辑
This commit is contained in:
@@ -225,23 +225,6 @@ const TemplateList: React.FC = () => {
|
|||||||
<Tag color={getCategoryColor(category)}>{ClassificationMap[category as keyof typeof ClassificationMap]?.label || category}</Tag>
|
<Tag color={getCategoryColor(category)}>{ClassificationMap[category as keyof typeof ClassificationMap]?.label || category}</Tag>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "类型",
|
|
||||||
dataIndex: "builtIn",
|
|
||||||
key: "builtIn",
|
|
||||||
width: 100,
|
|
||||||
render: (builtIn: boolean) => (
|
|
||||||
<Tag color={builtIn ? "gold" : "default"}>
|
|
||||||
{builtIn ? "系统内置" : "自定义"}
|
|
||||||
</Tag>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "版本",
|
|
||||||
dataIndex: "version",
|
|
||||||
key: "version",
|
|
||||||
width: 80,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: "创建时间",
|
title: "创建时间",
|
||||||
dataIndex: "createdAt",
|
dataIndex: "createdAt",
|
||||||
@@ -249,46 +232,6 @@ const TemplateList: React.FC = () => {
|
|||||||
width: 180,
|
width: 180,
|
||||||
render: (date: string) => new Date(date).toLocaleString(),
|
render: (date: string) => new Date(date).toLocaleString(),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "操作",
|
|
||||||
key: "action",
|
|
||||||
width: 200,
|
|
||||||
fixed: "right",
|
|
||||||
render: (_, record) => (
|
|
||||||
<Space size="small">
|
|
||||||
<Tooltip title="查看详情">
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
icon={<EyeOutlined />}
|
|
||||||
onClick={() => handleView(record)}
|
|
||||||
/>
|
|
||||||
</Tooltip>
|
|
||||||
<>
|
|
||||||
<Tooltip title="编辑">
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
icon={<EditOutlined />}
|
|
||||||
onClick={() => handleEdit(record)}
|
|
||||||
/>
|
|
||||||
</Tooltip>
|
|
||||||
<Popconfirm
|
|
||||||
title="确定要删除这个模板吗?"
|
|
||||||
onConfirm={() => handleDelete(record.id)}
|
|
||||||
okText="确定"
|
|
||||||
cancelText="取消"
|
|
||||||
>
|
|
||||||
<Tooltip title="删除">
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
danger
|
|
||||||
icon={<DeleteOutlined />}
|
|
||||||
/>
|
|
||||||
</Tooltip>
|
|
||||||
</Popconfirm>
|
|
||||||
</>
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user