ant-design/components/message/demo/loading.md
2015-10-20 16:47:55 +08:00

22 lines
413 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 加载中
- order: 5
进行全局 loading异步自行移除。
---
````jsx
var Button = antd.Button;
var message = antd.message;
var success = function() {
var hide = message.loading('正在执行中...', 0);
// 异步手动移除
setTimeout(hide, 2500);
};
ReactDOM.render(<Button onClick={success}>显示加载中...</Button>
, document.getElementById('components-message-demo-loading'));
````