update popconfirm demo

This commit is contained in:
afc163 2015-07-17 00:25:03 +08:00
parent 668f6f8edf
commit 23c9836805
2 changed files with 9 additions and 3 deletions

View File

@ -8,13 +8,18 @@
````jsx
var Popconfirm = antd.Popconfirm;
var message = antd.message;
function confirm() {
console.log('点击了确定');
message.success('点击了确定');
}
function cancel() {
message.error('点击了取消');
}
React.render(
<Popconfirm title="确定要删除这个任务吗?" onConfirm={confirm}>
<Popconfirm title="确定要删除这个任务吗?" onConfirm={confirm} onCancel={cancel}>
<a href="javascript:;">删除</a>
</Popconfirm>
, document.getElementById('components-popconfirm-demo-basic'));

View File

@ -8,10 +8,11 @@
````jsx
var Popconfirm = antd.Popconfirm;
var message = antd.message;
var text = '确认文案';
function confirm() {
console.log('点击了确定');
message.info('点击了确定');
}
React.render(<div>