(options: ConfirmDialogOptions)
| 23 | const { modal } = App.useApp() |
| 24 | |
| 25 | const showConfirmDialog = (options: ConfirmDialogOptions): void => { |
| 26 | const { title, content, okText = '确定', cancelText = '取消', danger, onOk, onCancel } = options |
| 27 | |
| 28 | modal.confirm({ |
| 29 | title, |
| 30 | content, |
| 31 | icon: <ExclamationCircleOutlined />, |
| 32 | okText, |
| 33 | cancelText, |
| 34 | okButtonProps: danger ? { danger: true } : undefined, |
| 35 | onOk, |
| 36 | onCancel |
| 37 | }) |
| 38 | } |
| 39 | |
| 40 | const showDeleteConfirm = (options: { |
| 41 | title?: string |