跳到正文Skip to content

确认对话框Confirm Dialog ConfirmDialog

危险操作二次确认Two-step confirmation for destructive actions

浮层Overlay Vue 组件Vue component

实时示例Live example

活体样例,可直接交互(点开浮层 / 下拉 / 试试键盘)——与组件画廊同源,切主题会同步。Interactive sample straight from the gallery (open overlays, dropdowns, try the keyboard); the theme stays in sync. 新标签打开 ↗Open in new tab ↗ · 看完整画廊Full gallery

PropsProps9

名称Name类型Type必填Required默认值Default说明Notes
title string 是yes —
desc string 否no —
tone 'danger' | 'primary' 否no 'primary'
confirmText string 否no —
cancelText string 否no —
confirmIcon string 否no —
body () => VNodeChild 否no —
infoOnly boolean 否no —
onConfirm (ctx: { close: () => void }) => void 否no —

Class 契约Class contract

照抄以下类名,不要自造——它们是本设计系统的唯一命名空间(anx- 前缀)。Copy these class names as-is — they are the system’s only namespace (anx- prefix).

anx-btn anx-btn--danger anx-btn--ghost anx-btn--primary

依赖Dependencies

Icon ModalShell overlayState

源码Source

vue/overlay/ConfirmDialog.vue 在 GitHub 上查看View on GitHub ↗