2020-11-27 13:40:40 +08:00
|
|
|
---
|
|
|
|
order: 98
|
|
|
|
title:
|
|
|
|
zh-CN: 自动换行
|
|
|
|
en-US: Wrap
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
自动换行。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
Auto wrap line.
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
```tsx
|
2022-05-21 22:14:15 +08:00
|
|
|
import { Button, Space } from 'antd';
|
2022-05-19 09:46:26 +08:00
|
|
|
import React from 'react';
|
2020-11-27 13:40:40 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => (
|
2020-12-09 17:12:32 +08:00
|
|
|
<Space size={[8, 16]} wrap>
|
|
|
|
{new Array(20).fill(null).map((_, index) => (
|
|
|
|
// eslint-disable-next-line react/no-array-index-key
|
|
|
|
<Button key={index}>Button</Button>
|
|
|
|
))}
|
|
|
|
</Space>
|
|
|
|
);
|
2020-11-27 13:40:40 +08:00
|
|
|
|
2022-04-28 20:54:19 +08:00
|
|
|
export default App;
|
2020-11-27 13:40:40 +08:00
|
|
|
```
|