You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
697 B
39 lines
697 B
5 years ago
|
---
|
||
|
order: 0
|
||
|
title:
|
||
|
zh-CN: 基本用法
|
||
|
en-US: Basic Usage
|
||
|
---
|
||
|
|
||
|
## zh-CN
|
||
|
|
||
|
相邻组件水平间距。
|
||
|
|
||
|
## en-US
|
||
|
|
||
|
Crowded components horizontal spacing.
|
||
|
|
||
|
```jsx
|
||
|
import { Button, Space, Upload, Popconfirm } from 'antd';
|
||
|
import { UploadOutlined } from '@ant-design/icons';
|
||
|
|
||
|
function SpaceDemo() {
|
||
|
return (
|
||
|
<Space>
|
||
|
Space
|
||
|
<Button type="primary">Button</Button>
|
||
|
<Upload>
|
||
|
<Button>
|
||
|
<UploadOutlined /> Click to Upload
|
||
|
</Button>
|
||
|
</Upload>
|
||
|
<Popconfirm title="Are you sure delete this task?" okText="Yes" cancelText="No">
|
||
|
<Button>Confirm</Button>
|
||
|
</Popconfirm>
|
||
|
</Space>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
ReactDOM.render(<SpaceDemo />, mountNode);
|
||
|
```
|