mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 15:19:58 +08:00
43 lines
601 B
Markdown
43 lines
601 B
Markdown
---
|
|
order: 6
|
|
title:
|
|
zh-CN: 排序
|
|
en-US: Order
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
通过 Order 来改变元素的排序。
|
|
|
|
## en-US
|
|
|
|
To change the element sort by order.
|
|
|
|
```jsx
|
|
import { Row, Col } from 'antd';
|
|
|
|
ReactDOM.render(
|
|
<Row>
|
|
<Col span={6} order={4}>
|
|
1 col-order-4
|
|
</Col>
|
|
<Col span={6} order={3}>
|
|
2 col-order-3
|
|
</Col>
|
|
<Col span={6} order={2}>
|
|
3 col-order-2
|
|
</Col>
|
|
<Col span={6} order={1}>
|
|
4 col-order-1
|
|
</Col>
|
|
</Row>,
|
|
mountNode,
|
|
);
|
|
```
|
|
|
|
```css
|
|
#components-grid-demo-flex-order [class~='ant-row'] {
|
|
background: rgba(128, 128, 128, 0.08);
|
|
}
|
|
```
|