Preview Updated 2026-05-10

Grid

A 24-column Row / Col grid system for page ratios, gutters, offsets, and responsive layout.

Basic Usage

CfRow / CfCol form a 24-column grid system. span=6 is 25%, span=8 is 33.33%, and span=12 is 50%. gutter controls horizontal and vertical spacing, while offset creates left-side blank columns.

100%
25%
25% + offset 6
33.33%
33.33% + offset 8
50%
66.66%
xs=24 / md=12 / lg=8
响应式断点
gutter=[12, 12]
Demo source
src/App.vue vue
<CfRow :gutter="[16, 16]">
<CfCol :span="6">25%</CfCol>
<CfCol :span="12">50%</CfCol>
<CfCol :span="6">25%</CfCol>
</CfRow>
src/App.tsx tsx
<CfRow gutter={[16, 16]}>
<CfCol span={6}>25%</CfCol>
<CfCol span={12}>50%</CfCol>
<CfCol span={6}>25%</CfCol>
</CfRow>

Row API

PropTypeDefaultDescription
asstring / ElementTypedivRendered element
gutternumber / string / [x, y]0Horizontal / vertical spacing
justifystart / center / end / space-around / space-between / space-evenlystartHorizontal distribution
aligntop / middle / bottom / stretchtopVertical alignment
wrapbooleantrueAllow wrapping

Col API

PropTypeDefaultDescription
asstring / ElementTypedivRendered element
spannumber24Column span, 0–24
offsetnumber0Left offset columns
pushnumber0Move right by columns
pullnumber0Move left by columns
ordernumber0Flex order
xs / sm / md / lg / xl / xxlnumber / ColBreakpointConfigResponsive config

反馈与讨论

Grid · Discussion

0
0 / 600
一键发送
正在加载评论...