2015-09-07 12:27:09 +08:00
|
|
|
|
# 加载中
|
|
|
|
|
|
2015-09-07 12:32:31 +08:00
|
|
|
|
- order: 5
|
2015-09-07 12:27:09 +08:00
|
|
|
|
|
|
|
|
|
进行全局 loading,异步自行移除。
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
````jsx
|
2015-10-08 15:13:04 +08:00
|
|
|
|
var Button = antd.Button;
|
2015-09-07 12:27:09 +08:00
|
|
|
|
|
2015-10-08 15:13:04 +08:00
|
|
|
|
var message = antd.message;
|
2015-09-07 12:27:09 +08:00
|
|
|
|
var success = function() {
|
|
|
|
|
var hide = message.loading('正在执行中...', 0);
|
|
|
|
|
// 异步手动移除
|
|
|
|
|
setTimeout(hide, 2500);
|
|
|
|
|
};
|
|
|
|
|
|
2015-10-20 16:47:55 +08:00
|
|
|
|
ReactDOM.render(<Button onClick={success}>显示加载中...</Button>
|
2015-09-07 12:27:09 +08:00
|
|
|
|
, document.getElementById('components-message-demo-loading'));
|
|
|
|
|
````
|