ant-design/components/grid/demo/flex-stretch.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

643 B

order title
7
zh-CN en-US
Flex 填充 Flex Stretch

zh-CN

Col 提供 flex 属性以支持填充。

en-US

Col provides flex prop to support fill rest.

import { Row, Col } from 'antd';

ReactDOM.render(
  <div>
    <p>Percentage columns</p>
    <Row>
      <Col flex={2}>2 / 5</Col>
      <Col flex={3}>3 / 5</Col>
    </Row>
    <p>Fill rest</p>
    <Row>
      <Col flex="100px">100px</Col>
      <Col flex="auto">Fill Rest</Col>
    </Row>
    <p>Raw flex style</p>
    <Row>
      <Col flex="1 1 200px">1 1 200px</Col>
      <Col flex="0 1 300px">0 1 300px</Col>
    </Row>
  </div>,
  mountNode,
);