2019-09-12 22:32:29 +08:00
|
|
|
---
|
|
|
|
order: 5
|
|
|
|
title:
|
|
|
|
zh-CN: 搜索框 loading
|
|
|
|
en-US: Search box with loading
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
用于 `onSearch` 的时候展示 `loading`。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
Search loading when onSearch.
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
```tsx
|
2019-09-12 22:32:29 +08:00
|
|
|
import { Input } from 'antd';
|
2022-05-21 22:14:15 +08:00
|
|
|
import React from 'react';
|
2019-09-12 22:32:29 +08:00
|
|
|
|
|
|
|
const { Search } = Input;
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => (
|
2020-04-23 18:11:11 +08:00
|
|
|
<>
|
2020-06-17 10:58:24 +08:00
|
|
|
<Search placeholder="input search loading default" loading />
|
2019-09-12 22:32:29 +08:00
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<Search placeholder="input search loading with enterButton" loading enterButton />
|
2020-10-14 16:35:29 +08:00
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<Search placeholder="input search text" enterButton="Search" size="large" loading />
|
2022-04-03 23:27:45 +08:00
|
|
|
</>
|
2019-09-12 22:32:29 +08:00
|
|
|
);
|
2022-05-19 09:46:26 +08:00
|
|
|
|
|
|
|
export default App;
|
2019-09-12 22:32:29 +08:00
|
|
|
```
|