Skip to content

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

属性类型默认值说明
gutternumber | [number, number] | Partial<Record<Breakpoint, number>>列间距(水平)或 [水平, 垂直]
justify'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly'水平排列方式
align'top' | 'middle' | 'bottom' | 'stretch'垂直对齐方式
wrapbooleantrue是否自动换行

ACol Props

属性类型默认值说明
spannumber列宽,0–24
offsetnumber向右偏移列数
ordernumber排列顺序
flexstring | numberflex 属性,优先级高于 span
xsColSize< 576px 响应式配置
smColSize≥ 576px 响应式配置
mdColSize≥ 768px 响应式配置
lgColSize≥ 992px 响应式配置
xlColSize≥ 1200px 响应式配置
xxlColSize≥ 1600px 响应式配置

ColSize = number | { span?: number; offset?: number; order?: number }

Breakpoint

断点宽度范围
xs< 576px
sm≥ 576px
md≥ 768px
lg≥ 992px
xl≥ 1200px
xxl≥ 1600px

AUI Vue Components — Built with Vue 3 & VitePress