ant-design/components/popconfirm/demo/basic.md
afc163 753c01ae18 ES6 syntax for demo code
fix antd.notification
2015-10-28 20:55:49 +08:00

27 lines
460 B
Markdown

# 基本
- order: 0
最简单的用法。
---
````jsx
import { Popconfirm, message } from 'antd';
function confirm() {
message.success('点击了确定');
}
function cancel() {
message.error('点击了取消');
}
ReactDOM.render(
<Popconfirm title="确定要删除这个任务吗?" onConfirm={confirm} onCancel={cancel}>
<a href="javascript:;">删除</a>
</Popconfirm>
, document.getElementById('components-popconfirm-demo-basic'));
````