mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 19:50:05 +08:00
21 lines
404 B
Markdown
21 lines
404 B
Markdown
|
# 加载中
|
|||
|
|
|||
|
- order: 4
|
|||
|
|
|||
|
进行全局 loading,异步自行移除。
|
|||
|
|
|||
|
---
|
|||
|
|
|||
|
````jsx
|
|||
|
var message = antd.message;
|
|||
|
|
|||
|
var success = function() {
|
|||
|
var hide = message.loading('正在执行中...', 0);
|
|||
|
// 异步手动移除
|
|||
|
setTimeout(hide, 2500);
|
|||
|
};
|
|||
|
|
|||
|
React.render(<button className="ant-btn" onClick={success}>显示加载中...</button>
|
|||
|
, document.getElementById('components-message-demo-loading'));
|
|||
|
````
|