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

26 lines
398 B
Markdown
Raw Normal View History

2015-06-24 19:20:47 +08:00
# 基本
- order: 0
最简单的用法。
---
````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
````