调整归档操作入口

This commit is contained in:
2026-07-16 10:44:21 +08:00
parent 1737563516
commit 200d2e423b
2 changed files with 43 additions and 32 deletions

View File

@@ -154,16 +154,6 @@ const ClassesPage: React.FC = () => {
}
};
const handleDelete = async (id: number) => {
try {
await api.delete(`/classes/${id}`);
message.success('已删除');
fetchData();
} catch (e: any) {
message.error(e?.message || '删除失败');
}
};
const columns: ColumnsType<ClassItem> = useMemo(() => [
{
title: '班级名称', dataIndex: 'name', width: 120,
@@ -208,11 +198,6 @@ const ClassesPage: React.FC = () => {
<PermissionButton permission="class:edit" size="small"></PermissionButton>
</Popconfirm>
)}
<Popconfirm title="确认删除?" onConfirm={() => handleDelete(r.id)}>
<PermissionButton permission="class:delete" size="small" danger>
</PermissionButton>
</Popconfirm>
</Space>
),
},