Popconfirm 气泡确认
锚定在按钮旁的轻量确认,用于单条、影响小的操作。
TableAction 的按钮写 popConfirm 就会用它。
安装
pnpm dlx shadcn@latest add https://docs.linasan.cn/r/popconfirm.json第一次装本站的组件前先在项目里执行一次 shadcn init,详见 安装。
用法
import { Popconfirm } from '@/components/feedback/popconfirm';
<Popconfirm title="确定删除?" onConfirm={remove}>
<Button variant="ghost-danger">删除</Button>
</Popconfirm>属性
属性
类型