2017-11-04 12:05:25 +08:00
|
|
|
---
|
2017-11-06 21:28:51 +08:00
|
|
|
order: 6
|
2017-11-04 12:05:25 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 自定义指示符
|
|
|
|
en-US: Custom spinning indicator
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
使用自定义指示符。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
Use custom loading indicator.
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
```tsx
|
|
|
|
import React from 'react';
|
2019-08-13 14:07:17 +08:00
|
|
|
import { Spin } from 'antd';
|
2019-11-28 12:34:33 +08:00
|
|
|
import { LoadingOutlined } from '@ant-design/icons';
|
2017-11-04 12:05:25 +08:00
|
|
|
|
2019-11-28 12:34:33 +08:00
|
|
|
const antIcon = <LoadingOutlined style={{ fontSize: 24 }} spin />;
|
2017-11-04 12:05:25 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => <Spin indicator={antIcon} />;
|
|
|
|
|
|
|
|
export default App;
|
2019-05-07 14:57:32 +08:00
|
|
|
```
|