2015-06-24 19:20:47 +08:00
|
|
|
# 基本
|
|
|
|
|
|
|
|
- order: 0
|
|
|
|
|
|
|
|
最简单的用法。
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
````jsx
|
2015-10-28 20:55:49 +08:00
|
|
|
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}>
|
2015-11-25 17:35:49 +08:00
|
|
|
<a href="#">删除</a>
|
2015-06-24 19:20:47 +08:00
|
|
|
</Popconfirm>
|
2015-12-29 12:08:58 +08:00
|
|
|
, mountNode);
|
2015-06-24 19:20:47 +08:00
|
|
|
````
|