xx
This commit is contained in:
@@ -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>
|
||||
),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user