ant-design/components/popconfirm/demo/basic.md

25 lines
403 B
Markdown
Raw Normal View History

2016-03-31 09:40:55 +08:00
---
order: 0
title: 基本
---
2015-06-24 19:20:47 +08:00
最简单的用法。
````jsx
import { Popconfirm, message } from 'antd';
2015-06-24 19:20:47 +08:00
function confirm() {
2015-07-17 00:25:03 +08:00
message.success('点击了确定');
}
function cancel() {
message.error('点击了取消');
2015-06-24 19:20:47 +08:00
}
2015-10-20 16:47:55 +08:00
ReactDOM.render(
2015-07-17 00:25:03 +08:00
<Popconfirm title="确定要删除这个任务吗?" onConfirm={confirm} onCancel={cancel}>
<a href="#">删除</a>
2015-06-24 19:20:47 +08:00
</Popconfirm>
, mountNode);
2015-06-24 19:20:47 +08:00
````