ant-design/components/message/demo/loading.md

21 lines
353 B
Markdown
Raw Normal View History

2015-09-07 12:27:09 +08:00
# 加载中
- order: 3
2015-09-07 12:27:09 +08:00
进行全局 loading异步自行移除。
---
````jsx
import { message, Button } from 'antd';
2015-09-07 12:27:09 +08:00
const success = function () {
let hide = message.loading('正在执行中...', 0);
2015-09-07 12:27:09 +08:00
// 异步手动移除
setTimeout(hide, 2500);
};
2015-10-20 16:47:55 +08:00
ReactDOM.render(<Button onClick={success}>显示加载中...</Button>
, mountNode);
2015-09-07 12:27:09 +08:00
````