2015-09-07 12:32:31 +08:00
|
|
|
# 修改延时
|
2015-07-11 11:27:10 +08:00
|
|
|
|
2015-12-10 16:41:41 +08:00
|
|
|
- order: 2
|
2015-07-11 11:27:10 +08:00
|
|
|
|
2015-09-07 12:32:31 +08:00
|
|
|
自定义时长 `10s`,默认时长为 `1.5s`。
|
2015-07-11 11:27:10 +08:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
````jsx
|
2015-10-28 20:55:49 +08:00
|
|
|
import { message, Button } from 'antd';
|
2015-07-11 11:27:10 +08:00
|
|
|
|
2016-01-27 16:53:05 +08:00
|
|
|
const success = function () {
|
2015-07-11 18:19:48 +08:00
|
|
|
message.success('这是一条成功的提示,并将于10秒后消失', 10);
|
2015-07-11 18:00:58 +08:00
|
|
|
};
|
2015-07-11 11:27:10 +08:00
|
|
|
|
2015-12-10 16:41:41 +08:00
|
|
|
ReactDOM.render(<Button onClick={success}>自定义时长提示</Button>
|
2015-12-29 12:08:58 +08:00
|
|
|
, mountNode);
|
2015-07-11 11:27:10 +08:00
|
|
|
````
|