ant-design/components/alert/index.zh-CN.md
MuYu fb0b4f0fc9 docs: show version Number features were added (#17373)
* docs: add api first appearance

* docs: fix auto-complete doc

* docs: replace Version Added with Version

* docs: date picker common method

* docs: date picker common method

* docs: tree

* docs: remove meaningless 3.0.0
2019-07-11 14:14:33 +08:00

29 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
category: Components
subtitle: 警告提示
type: 反馈
title: Alert
---
警告提示,展现需要关注的信息。
## 何时使用
- 当某个页面需要向用户显示警告的信息时。
- 非浮层的静态展现形式,始终展现,不会自动消失,用户可以点击关闭。
## API
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| --- | --- | --- | --- | --- |
| afterClose | 关闭动画结束后触发的回调函数 | () => void | - | 3.3.1 |
| banner | 是否用作顶部公告 | boolean | false | |
| closable | 默认不显示关闭按钮 | boolean | 无 | |
| closeText | 自定义关闭按钮 | string\|ReactNode | 无 | |
| description | 警告提示的辅助性文字介绍 | string\|ReactNode | 无 | |
| icon | 自定义图标,`showIcon` 为 `true` 时有效 | ReactNode | - | 3.10.0 |
| message | 警告提示内容 | string\|ReactNode | 无 | |
| showIcon | 是否显示辅助图标 | boolean | false`banner` 模式下默认值为 true | |
| type | 指定警告提示的样式,有四种选择 `success`、`info`、`warning`、`error` | string | `info``banner` 模式下默认值为 `warning` | |
| onClose | 关闭时触发的回调函数 | (e: MouseEvent) => void | 无 | |