Appearance
Grid 栅格
24 列动态栅格系统,支持间距、偏移、响应式断点。
基础用法
col-24
col-12
col-12
col-8
col-8
col-8
col-6
col-6
col-6
col-6
偏移
col-8
col-8 offset-8
col-6 offset-6
col-6 offset-6
响应式
xs=24 sm=12 md=8 lg=6
xs=24 sm=12 md=8 lg=6
xs=24 sm=12 md=8 lg=6
xs=24 sm=12 md=8 lg=6
API
ARow Props
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
gutter | number | [number, number] | Partial<Record<Breakpoint, number>> | — | 列间距(水平)或 [水平, 垂直] |
justify | 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly' | — | 水平排列方式 |
align | 'top' | 'middle' | 'bottom' | 'stretch' | — | 垂直对齐方式 |
wrap | boolean | true | 是否自动换行 |
ACol Props
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
span | number | — | 列宽,0–24 |
offset | number | — | 向右偏移列数 |
order | number | — | 排列顺序 |
flex | string | number | — | flex 属性,优先级高于 span |
xs | ColSize | — | < 576px 响应式配置 |
sm | ColSize | — | ≥ 576px 响应式配置 |
md | ColSize | — | ≥ 768px 响应式配置 |
lg | ColSize | — | ≥ 992px 响应式配置 |
xl | ColSize | — | ≥ 1200px 响应式配置 |
xxl | ColSize | — | ≥ 1600px 响应式配置 |
ColSize = number | { span?: number; offset?: number; order?: number }
Breakpoint
| 断点 | 宽度范围 |
|---|---|
xs | < 576px |
sm | ≥ 576px |
md | ≥ 768px |
lg | ≥ 992px |
xl | ≥ 1200px |
xxl | ≥ 1600px |