feat(useconfig): 删除操作二次确定
This commit is contained in:
parent
d31601f1f6
commit
89f44375df
|
@ -5,6 +5,7 @@
|
|||
"Appstore",
|
||||
"koale",
|
||||
"mibrc",
|
||||
"Popconfirm",
|
||||
"readablize",
|
||||
"Sider",
|
||||
"spath",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {
|
||||
Button, Card, Empty, message, Modal, Select, Space,
|
||||
Button, Card, Empty, message, Modal, Popconfirm, Select, Space,
|
||||
} from 'antd';
|
||||
import {
|
||||
useEffect, Key,
|
||||
|
@ -86,8 +86,17 @@ export default function Analysis() {
|
|||
align: 'center',
|
||||
render: (_: any, record: BackItemType) => (
|
||||
<Space>
|
||||
|
||||
<Button type="link" onClick={() => backupNode(record)}>单独备份</Button>
|
||||
<Button type="link" onClick={() => deleteNode(record)}>删除节点</Button>
|
||||
|
||||
<Popconfirm
|
||||
title="确认删除该节点?"
|
||||
onConfirm={() => deleteNode(record)}
|
||||
okText="是"
|
||||
cancelText="否"
|
||||
>
|
||||
<Button type="link">删除节点</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {
|
||||
Button, Card, Empty, List, Radio, RadioChangeEvent, Space, Tag,
|
||||
Button, Card, Empty, List, Popconfirm, Radio, RadioChangeEvent, Space, Tag,
|
||||
} from 'antd';
|
||||
import { useState } from 'react';
|
||||
import { PlusCircleOutlined, DeleteOutlined } from '@ant-design/icons';
|
||||
|
@ -61,7 +61,16 @@ export default function Settings() {
|
|||
dataIndex: 'actions',
|
||||
key: 'actions',
|
||||
align: 'center',
|
||||
render: (_: any, item: BackItemType) => <Button onClick={() => deleteBackupItem(item)} type="link">Delete</Button>
|
||||
render: (_: any, item: BackItemType) => (
|
||||
<Popconfirm
|
||||
title="确认删除该节点?"
|
||||
onConfirm={() => deleteBackupItem(item)}
|
||||
okText="是"
|
||||
cancelText="否"
|
||||
>
|
||||
<Button type="link">Delete</Button>
|
||||
</Popconfirm>
|
||||
)
|
||||
,
|
||||
},
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue