mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 21:59:41 +08:00
882cec62d6
* docs: Add components overview page * fix detail * remove ContributorsList form overview page * fix components url * improve code style * remove extra file * fix detail * fix lint * fix lint * docs: Finish components overview page * fix lint * docs: Update cover * fix lint * update cover * update menu * improve overview page * refactor code * fix order * update title * add components count * fix overview page ssr bug * move less file * update title margin Co-authored-by: arvinxx <arvinx@foxmail.com>
37 lines
1.3 KiB
Markdown
37 lines
1.3 KiB
Markdown
---
|
|
category: Components
|
|
subtitle: 气泡确认框
|
|
type: 反馈
|
|
title: Popconfirm
|
|
cover: https://gw.alipayobjects.com/zos/alicdn/8ln6VUFkX/Popconfirm.svg
|
|
---
|
|
|
|
点击元素,弹出气泡式的确认框。
|
|
|
|
## 何时使用
|
|
|
|
目标元素的操作需要用户进一步的确认时,在目标元素附近弹出浮层提示,询问用户。
|
|
|
|
和 `confirm` 弹出的全屏居中模态对话框相比,交互形式更轻量。
|
|
|
|
## API
|
|
|
|
| 参数 | 说明 | 类型 | 默认值 |
|
|
| --- | --- | --- | --- |
|
|
| cancelText | 取消按钮文字 | string | 取消 |
|
|
| okText | 确认按钮文字 | string | 确定 |
|
|
| okType | 确认按钮类型 | string | primary |
|
|
| okButtonProps | ok 按钮 props | [ButtonProps](/components/button/#API) | - |
|
|
| cancelButtonProps | cancel 按钮 props | [ButtonProps](/components/button/#API) | - |
|
|
| title | 确认框的描述 | string\|ReactNode\|() => ReactNode | - |
|
|
| onCancel | 点击取消的回调 | function(e) | - |
|
|
| onConfirm | 点击确认的回调 | function(e) | - |
|
|
| icon | 自定义弹出气泡 Icon 图标 | ReactNode | `<ExclamationCircle />` |
|
|
| disabled | 点击 Popconfirm 子元素是否弹出气泡确认框 | boolean | false |
|
|
|
|
更多属性请参考 [Tooltip](/components/tooltip/#API)。
|
|
|
|
## 注意
|
|
|
|
请确保 `Popconfirm` 的子元素能接受 `onMouseEnter`、`onMouseLeave`、`onFocus`、`onClick` 事件。
|