This commit is contained in:
mmc
2026-05-15 10:03:33 +08:00
parent 59a328c10b
commit de2219b4b5
5 changed files with 179 additions and 73 deletions

View File

@@ -1,6 +1,6 @@
import React, { useState } from 'react';
import {
Table, Input, Button, Form, Space, Card, Modal, message
Table, Input, Button, Form, Space, Card, Modal, message, Popconfirm
} from 'antd';
import { EditOutlined, DeleteOutlined } from '@ant-design/icons';
@@ -77,11 +77,12 @@ const DictManager = ({
<Button type="link" icon={<EditOutlined />} onClick={() => handleEdit(record)}>
编辑
</Button>
<Button
type="link"
danger
icon={<DeleteOutlined />}
onClick={async () => {
<Popconfirm
title="确定要删除这条数据吗?"
description="删除后将无法恢复"
okText="确定"
cancelText="取消"
onConfirm={async () => {
try {
const res = await onDelete(record.id);
if (res?.code === 200) {
@@ -95,8 +96,10 @@ const DictManager = ({
}
}}
>
删除
</Button>
<Button type="link" danger icon={<DeleteOutlined />}>
删除
</Button>
</Popconfirm>
</Space>
),
},