ant-design-vue/antdv-demo/docs/grid/demo/flex-fill.md

38 lines
774 B
Markdown
Raw Normal View History

2021-03-12 07:48:30 +00:00
<cn>
#### Flex 填充
Col 提供 `flex` 属性以支持填充。
</cn>
<us>
#### Flex fill
Col provides `flex` prop to support fill rest.
</us>
```vue
<template>
<div>
<a-divider orientation="left">
Percentage columns
</a-divider>
<a-row type="flex">
<a-col :flex="2">2 / 5</a-col>
<a-col :flex="3">3 / 5</a-col>
</a-row>
<a-divider orientation="left">
Fill rest
</a-divider>
<a-row type="flex">
<a-col flex="100px">100px</a-col>
<a-col flex="auto">auto</a-col>
</a-row>
<a-divider orientation="left">
Raw flex style
</a-divider>
<a-row type="flex">
<a-col flex="1 1 200px">1 1 200px</a-col>
<a-col flex="0 1 300px">0 1 300px</a-col>
</a-row>
</div>
</template>
```