ant-design/components/grid/demo/flex-order.md
二货机器人 efd3b35830
feat: Col support flex prop (#16635)
* feat: Col support `flex` prop

* update snapshot

* update doc

* row component use flex type by default

* revert grid flex layout doc

* remove float style

* remove doc old FAQ

* revert .make-row

* col style use flex and max-width

* remove useless Col style and imorove base doc for a single Col

* update snapshots

* fix flex mode pseudo

* update snapshots

* back to old flex mode demo gray background color

* set default col flex => 1 auto

* change grid about flex mode description

* update snapshots

* improve grid introduce and fix with gutter bug

* update snapshots

* remove version
2019-11-20 11:13:24 +08:00

45 lines
628 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(
<div>
<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>
</div>,
mountNode,
);
```
```css
#components-grid-demo-flex-order [class~='ant-row'] {
background: #f5f5f5;
}
```