fix(ui): move eval delete to drawer header to stop row click opening detail
All checks were successful
CI / test (push) Successful in 3m23s

This commit is contained in:
sinohqb 2026-08-21 17:01:39 +08:00
parent 8021eab65e
commit 5f116700d7

View File

@ -146,6 +146,7 @@ export default function IntelligentEvalsPage() {
const handleDelete = async (id: string) => {
await intelligentEvalsApi.remove(id)
message.success('已删除')
closeDrawer()
void reloadList()
}
@ -190,22 +191,9 @@ export default function IntelligentEvalsPage() {
render: (v: string | null) => (v ? formatDateTime(v) : '—'),
},
{
title: '操作', key: 'action', width: 130, fixed: 'right' as const,
title: '操作', key: 'action', width: 88, fixed: 'right' as const,
render: (_, ev) => (
<Space size={4}>
<Button size="small" onClick={() => openDetail(ev.id)}></Button>
{TERMINAL_STATUSES.has(ev.status) && (
<Popconfirm
title="确认删除"
description="删除后不可恢复,确定要删除该评估吗?"
onConfirm={() => handleDelete(ev.id)}
okText="删除"
cancelText="取消"
>
<Button size="small" danger icon={<DeleteOutlined />} onClick={(e) => e.stopPropagation()} />
</Popconfirm>
)}
</Space>
),
},
]
@ -314,6 +302,17 @@ export default function IntelligentEvalsPage() {
<Button danger icon={<StopOutlined />}></Button>
</Popconfirm>
)}
{TERMINAL_STATUSES.has(selected.status) && (
<Popconfirm
title="确认删除"
description="删除后不可恢复,确定要删除该评估吗?"
onConfirm={() => void handleDelete(selected.id)}
okText="删除"
cancelText="取消"
>
<Button danger icon={<DeleteOutlined />}></Button>
</Popconfirm>
)}
</Space>
)}
>