mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
parent
7fd08efbb7
commit
c552b315bc
@ -27,6 +27,7 @@ This components provides 4 static methods, with arguments as following:
|
||||
|------------|------------------------------------|--------------------------|--------------|
|
||||
| content | content of the message | string\|ReactNode | - |
|
||||
| duration | time before auto-dismiss,in seconds | number | 1.5 |
|
||||
| getContainer | specify render container | () => HTMLElement | () => document.body |
|
||||
|
||||
Methods for global configuration and destruction are also provided:
|
||||
|
||||
|
@ -61,6 +61,7 @@ export interface ConfigOptions {
|
||||
top?: number;
|
||||
duration?: number;
|
||||
prefixCls?: string;
|
||||
getContainer?: () => HTMLElement;
|
||||
}
|
||||
|
||||
export default {
|
||||
|
@ -28,6 +28,7 @@ title: Message
|
||||
|------------|----------------|--------------------------|--------------|
|
||||
| content | 提示内容 | string\|ReactNode | - |
|
||||
| duration | 自动关闭的延时,单位秒 | number | 1.5 |
|
||||
| getContainer | 配置渲染节点的输出位置 | () => HTMLElement | () => document.body |
|
||||
|
||||
还提供了全局配置和全局销毁方法:
|
||||
|
||||
|
@ -38,7 +38,7 @@ The properties of config are as follows:
|
||||
| onClose | Specify a function that will be called after clicking the default close button | Function | - |
|
||||
| duration | A notification box is closed after 4.5s by default. When specifying `duration` to null or 0, it will never be closed automatically | number | 4.5 |
|
||||
| placement | To set the position, which can be one of `topLeft` `topRight` `bottomLeft` `bottomRight` | string | topRight |
|
||||
|
||||
| getContainer | specify render container | () => HTMLNode | () => document.body |
|
||||
|
||||
`notification` also provide a global `config()` method that can be used for specifying the default options. Once this method is used, all the notification boxes
|
||||
will take into account these globally defined options before displaying.
|
||||
|
@ -53,6 +53,7 @@ export interface ArgsProps {
|
||||
duration?: number;
|
||||
icon?: React.ReactNode;
|
||||
placement?: notificationPlacement;
|
||||
getContainer?: () => HTMLElement;
|
||||
}
|
||||
|
||||
export interface ConfigProps {
|
||||
|
@ -38,6 +38,7 @@ config 参数如下:
|
||||
| onClose | 点击默认关闭按钮时触发的回调函数 | Function | - |
|
||||
| duration | 默认 4.5 秒后自动关闭,配置为 null 则不自动关闭 | number | 4.5 |
|
||||
| placement | 弹出位置,可选 `topLeft` `topRight` `bottomLeft` `bottomRight` | string | topRight |
|
||||
| getContainer | 配置渲染节点的输出位置 | () => HTMLNode | () => document.body |
|
||||
|
||||
还提供了一个全局配置方法,在调用前提前配置,全局一次生效。
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
"rc-form": "~1.3.0",
|
||||
"rc-input-number": "~3.1.1",
|
||||
"rc-menu": "~5.0.9",
|
||||
"rc-notification": "~1.3.4",
|
||||
"rc-notification": "~1.4.0",
|
||||
"rc-pagination": "~1.7.0",
|
||||
"rc-progress": "~2.0.1",
|
||||
"rc-radio": "~2.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user