
## 代码
```jsx
class MessageDoc extends React.Component {
  constructor() {
    super();
    this.state = {};
  }
  showAlert() {
    alert({title: '提示', message: '这是一个alert'});
  }
  showConfirm() {
    confirm({
      title: '提示',
      message: '这是一个confirm',
      success: function () {
        console.info("confirm 确定的回调");
      },
      cancel: function () {
        console.info("confirm 取消的回调");
      }
    });
  }
  render() {
    return (
      <div>
        <div>
          <pre>
            <button className="btn btn-primary" onClick={this.showAlert.bind(this)}>Alert</button>
            &nbsp;
            <button className="btn btn-primary" onClick={this.showConfirm.bind(this)}>Confirm</button>
          </pre>
        </div>
      </div>
    ) 
  }
}

```


## 参数

| 名称 | 类型 | 默认值 | 描述 |
| :-- | :-- | :-- | :-- |
| title | String | "" | 必填 显示的title |
| message | String | "" | 必填 提示的内容 |
| success | Function | null | 点击确认按钮的回调方法 |
| cancel | Function | null | 点击关闭按钮的回调方法 |


