You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

611 B

order title
3 [{zh-CN 确认对话框} {en-US Confirmation modal dialog}]

zh-CN

使用 confirm() 可以快捷地弹出确认框。

en-US

To use confirm() to popup a confirmation modal dialog.

import { Modal, Button } from 'antd';
const confirm = Modal.confirm;

function showConfirm() {
  confirm({
    title: 'Are you sure you want to delete these items ?',
    content: 'some descriptions',
    onOk() {
      console.log('OK');
    },
    onCancel() {},
  });
}

ReactDOM.render(
  <Button onClick={showConfirm}>
    confirmation modal dialog
  </Button>
, mountNode);