Skip to content

AtConfirm

沈孟平
最后更新于 2025-11-18 14:57:11

NConfirm 在确认按钮点击时,不支持异步显示 loading,并且写起来一堆 template 略显麻烦,所以有了这个组件。并且它的触发按钮采用 AtIconBtn

代码演示

基础示例

自定义 Popconfirm 和触发按钮

自定义 message

API

AtConfirm Props

名称类型默认值说明版本
messagestring | Componentundefined二次确认消息
button-propsAtIconButtonProps{ type: 'error', secondary: true, size: 'tiny' }触发按钮的属性
confirm-propsPopconfirmPropsundefinedNaiveUI Popconfirm Props
on-confirmPromise必填项确认回调,支持异步 loading

changelog

e7a38 - feat(components): allow message prop to accept slots and VNodes on 2025/5/7
64f6a - feat(components): at-empty test on 2024/6/26
03854 - feat(components): at-confirm test on 2024/6/25

贡献者

Last updated: