mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 03:29:59 +08:00
update popconfirm demo
This commit is contained in:
parent
668f6f8edf
commit
23c9836805
@ -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'));
|
||||
|
@ -8,10 +8,11 @@
|
||||
|
||||
````jsx
|
||||
var Popconfirm = antd.Popconfirm;
|
||||
var message = antd.message;
|
||||
var text = '确认文案';
|
||||
|
||||
function confirm() {
|
||||
console.log('点击了确定');
|
||||
message.info('点击了确定');
|
||||
}
|
||||
|
||||
React.render(<div>
|
||||
|
Loading…
Reference in New Issue
Block a user