Appearance
AtConfirm
沈孟平
最后更新于 2025-11-18 14:57:11
NConfirm 在确认按钮点击时,不支持异步显示 loading,并且写起来一堆 template 略显麻烦,所以有了这个组件。并且它的触发按钮采用 AtIconBtn
代码演示
基础示例
自定义 Popconfirm 和触发按钮
自定义 message
API
AtConfirm Props
| 名称 | 类型 | 默认值 | 说明 | 版本 |
|---|---|---|---|---|
| message | string | Component | undefined | 二次确认消息 | |
| button-props | AtIconButtonProps | { type: 'error', secondary: true, size: 'tiny' } | 触发按钮的属性 | |
| confirm-props | PopconfirmProps | undefined | NaiveUI Popconfirm Props | |
| on-confirm | Promise | 必填项 | 确认回调,支持异步 loading |