

<DemoTitle title="Alert" desc="向用户突出显示的重要提示信息。">
#### API

<AntdApiRef url="https://ant.design/components/alert-cn/#api"></AntdApiRef>


## antd API

通用属性参考：[通用属性](/docs/react/common-props)

| 参数 | 说明 | 类型 | 默认值 | 版本 | 
|--------|--------|--------|--------|--------|
| action | 自定义操作项 | ReactNode | - | 4.9.0 | 
| afterClose | 关闭动画结束后触发的回调函数 | () => void | - |  | 
| banner | 是否用作顶部公告 | boolean | false |  | 
| closable | 可关闭配置，>=5.15.0: 支持  | boolean \| ({ closeIcon?: React.ReactNode } & React.AriaAttributes) | false |  | 
| description | 警告提示的辅助性文字介绍 | ReactNode | - |  | 
| icon | 自定义图标， | ReactNode | - |  | 
| message | 警告提示内容 | ReactNode | - |  | 
| showIcon | 是否显示辅助图标 | boolean | false， |  | 
| type | 指定警告提示的样式，有四种选择  | string | info |  | 
| onClose | 关闭时触发的回调函数 | (e: MouseEvent) => void | - |  | 


### Alert.ErrorBoundary

| 参数 | 说明 | 类型 | 默认值 | 版本 | 
|--------|--------|--------|--------|--------|
| description | 自定义错误内容，如果未指定会展示报错堆栈 | ReactNode | {{ error stack }} |  | 
| message | 自定义错误标题，如果未指定会展示原生报错信息 | ReactNode | {{ error }} |  | 
