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.
|
|
|
# 可关闭的警告提示
|
|
|
|
|
|
|
|
- order: 1
|
|
|
|
|
|
|
|
显示关闭按钮,点击可关闭警告提示。
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
````jsx
|
|
|
|
var Alert = require('antd/lib/alert');
|
|
|
|
|
|
|
|
var onClose = function(e) {
|
|
|
|
console.log(e, '我要被关闭啦!');
|
|
|
|
};
|
|
|
|
|
|
|
|
React.render(<div>
|
|
|
|
<Alert message="警告提示的文案"
|
|
|
|
type="warn"
|
|
|
|
closable
|
|
|
|
onClose={onClose} />
|
|
|
|
<Alert message="错误提示的文案"
|
|
|
|
description="错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍"
|
|
|
|
type="error"
|
|
|
|
closable
|
|
|
|
onClose={onClose} />
|
|
|
|
</div>, document.getElementById('components-alert-demo-closable'));
|
|
|
|
````
|