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

28 lines
475 B
Markdown
Raw Normal View History

2015-06-24 19:20:47 +08:00
# 基本
- order: 0
最简单的用法。
---
````jsx
var Popconfirm = antd.Popconfirm;
2015-07-17 00:25:03 +08:00
var message = antd.message;
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
}
React.render(
2015-07-17 00:25:03 +08:00
<Popconfirm title="确定要删除这个任务吗?" onConfirm={confirm} onCancel={cancel}>
2015-06-26 10:22:08 +08:00
<a href="javascript:;">删除</a>
2015-06-24 19:20:47 +08:00
</Popconfirm>
, document.getElementById('components-popconfirm-demo-basic'));
````