ant-design/components/popconfirm/index.zh-CN.md
Wanpan 50da162d8b
Some checks are pending
Publish Any Commit / build (push) Waiting to run
✅ test v6 / lint (push) Waiting to run
✅ test v6 / test-react-legacy (18, 1/2) (push) Waiting to run
✅ test v6 / test-react-legacy (18, 2/2) (push) Waiting to run
✅ test v6 / test-node (push) Waiting to run
✅ test v6 / test-react-latest (dom, 1/2) (push) Waiting to run
✅ test v6 / test-react-latest (dom, 2/2) (push) Waiting to run
✅ test v6 / test-react-latest-dist (dist, 1/2) (push) Blocked by required conditions
✅ test v6 / test-react-latest-dist (dist, 2/2) (push) Blocked by required conditions
✅ test v6 / test-react-latest-dist (dist-min, 1/2) (push) Blocked by required conditions
✅ test v6 / test-react-latest-dist (dist-min, 2/2) (push) Blocked by required conditions
✅ test v6 / test-coverage (push) Blocked by required conditions
✅ test v6 / build (push) Waiting to run
✅ test v6 / test lib/es module (es, 1/2) (push) Waiting to run
✅ test v6 / test lib/es module (es, 2/2) (push) Waiting to run
✅ test v6 / test lib/es module (lib, 1/2) (push) Waiting to run
✅ test v6 / test lib/es module (lib, 2/2) (push) Waiting to run
👁️ Visual Regression Persist Start / test image (push) Waiting to run
fix: replace rc-tooltip deprecated api (#52395)
* chore: add rc-tooltip

* chore: rename

* fix: remove deprecated api

* fix: update

* test: snap

* fix: update

* Update components/cascader/__tests__/index.test.tsx

Co-authored-by: thinkasany <480968828@qq.com>
Signed-off-by: Wanpan <wanpan96@163.com>

* Update components/cascader/__tests__/index.test.tsx

Co-authored-by: thinkasany <480968828@qq.com>
Signed-off-by: Wanpan <wanpan96@163.com>

* Update components/cascader/__tests__/index.test.tsx

Co-authored-by: thinkasany <480968828@qq.com>
Signed-off-by: Wanpan <wanpan96@163.com>

---------

Signed-off-by: Wanpan <wanpan96@163.com>
Co-authored-by: thinkasany <480968828@qq.com>
2025-01-15 23:17:18 +08:00

2.6 KiB
Raw Blame History

category group title subtitle description cover coverDark demo
Components 反馈 Popconfirm 气泡确认框 点击元素,弹出气泡式的确认框。 https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*a7tqQ6wrdeAAAAAAAAAAAAAADrJ8AQ/original https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*iwYsQpeFcB0AAAAAAAAAAAAADrJ8AQ/original
cols
2

何时使用

目标元素的操作需要用户进一步的确认时,在目标元素附近弹出浮层提示,询问用户。

confirm 弹出的全屏居中模态对话框相比,交互形式更轻量。

代码演示

基本 国际化 位置 贴边偏移 条件触发 自定义 Icon 图标 异步关闭 基于 Promise 的异步关闭 _InternalPanelDoNotUseOrYouWillBeFired 线框风格

API

通用属性参考:通用属性

参数 说明 类型 默认值 版本
cancelButtonProps cancel 按钮 props ButtonProps -
cancelText 取消按钮文字 string 取消
disabled 阻止点击 Popconfirm 子元素时弹出确认框 boolean false
icon 自定义弹出气泡 Icon 图标 ReactNode <ExclamationCircle />
okButtonProps ok 按钮 props ButtonProps -
okText 确认按钮文字 string 确定
okType 确认按钮类型 string primary
showCancel 是否显示取消按钮 boolean true 4.18.0
title 确认框标题 ReactNode | () => ReactNode -
description 确认内容的详细描述 ReactNode | () => ReactNode - 5.1.0
onCancel 点击取消的回调 function(e) -
onConfirm 点击确认的回调 function(e) -
onPopupClick 弹出气泡点击事件 function(e) - 5.5.0

Semantic DOM

主题变量Design Token

注意

请确保 Popconfirm 的子元素能接受 onMouseEnteronMouseLeaveonFocusonClick 事件。