(options: {
title?: string
content?: React.ReactNode
onOk: () => void | Promise<void>
})
| 38 | } |
| 39 | |
| 40 | const showDeleteConfirm = (options: { |
| 41 | title?: string |
| 42 | content?: React.ReactNode |
| 43 | onOk: () => void | Promise<void> |
| 44 | }): void => { |
| 45 | showConfirmDialog({ |
| 46 | title: options.title || '确认删除', |
| 47 | content: options.content || '此操作不可撤销,确定要删除吗?', |
| 48 | okText: '删除', |
| 49 | danger: true, |
| 50 | onOk: options.onOk |
| 51 | }) |
| 52 | } |
| 53 | |
| 54 | return { showConfirmDialog, showDeleteConfirm } |
| 55 | } |
no test coverage detected