mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-14 08:09:13 +08:00
20 lines
358 B
Markdown
20 lines
358 B
Markdown
---
|
||
order: 3
|
||
title: 加载中
|
||
---
|
||
|
||
进行全局 loading,异步自行移除。
|
||
|
||
````jsx
|
||
import { message, Button } from 'antd';
|
||
|
||
const success = function () {
|
||
let hide = message.loading('正在执行中...', 0);
|
||
// 异步手动移除
|
||
setTimeout(hide, 2500);
|
||
};
|
||
|
||
ReactDOM.render(<Button onClick={success}>显示加载中...</Button>
|
||
, mountNode);
|
||
````
|