zhujun24
9 years ago
11 changed files with 174 additions and 50 deletions
@ -0,0 +1,33 @@ |
|||
# 回调函数 |
|||
|
|||
- order: 5 |
|||
|
|||
警告提示被关闭时触发的回调函数,必须设置`closable="true"`。 |
|||
|
|||
--- |
|||
|
|||
````jsx |
|||
var Alert = require('antd/lib/alert'); |
|||
|
|||
var onClose = function(){ |
|||
console.log('我要被关闭啦!'); |
|||
} |
|||
|
|||
React.render( |
|||
<div> |
|||
<Alert |
|||
message="警告提示的文案" |
|||
type="warn" |
|||
closable="true" |
|||
onClose={onClose} |
|||
/> |
|||
<Alert |
|||
message="错误提示的文案" |
|||
description="错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍" |
|||
type="error" |
|||
closable="true" |
|||
onClose={onClose} |
|||
/> |
|||
</div>, |
|||
document.getElementById('components-alert-demo-onclose')); |
|||
```` |
Loading…
Reference in new issue