2016-08-03 14:54:10 +08:00
|
|
|
---
|
|
|
|
order: 6
|
2017-04-22 10:37:00 +08:00
|
|
|
iframe: 250
|
2016-08-03 14:54:10 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 顶部公告
|
|
|
|
en-US: Banner
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
2017-03-22 17:32:52 +08:00
|
|
|
页面顶部通告形式,默认有图标且`type` 为 'warning'。
|
2016-08-03 14:54:10 +08:00
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
2017-03-22 17:32:52 +08:00
|
|
|
Display Alert as a banner at top of page.
|
2016-08-03 14:54:10 +08:00
|
|
|
|
2017-02-13 10:55:53 +08:00
|
|
|
````jsx
|
2016-08-03 14:54:10 +08:00
|
|
|
import { Alert } from 'antd';
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<div>
|
|
|
|
<Alert message="Warning text" banner />
|
|
|
|
<br />
|
|
|
|
<Alert message="Very long warning text warning text text text text text text text" banner closable />
|
2017-04-22 10:37:00 +08:00
|
|
|
<br />
|
|
|
|
<Alert showIcon={false} message="Warning text without icon" banner />
|
|
|
|
<br />
|
|
|
|
<Alert type="error" message="Error text" banner />
|
2016-08-03 14:54:10 +08:00
|
|
|
</div>
|
|
|
|
, mountNode);
|
|
|
|
````
|