Skip to content

Layout 布局

通过基础的 24 分栏,迅速简便地创建布局。

基础布局

使用列创建基础网格布局。

通过 row 和 col 组件,并通过 col 组件的 span 属性我们就可以自由地组合布局。

分栏间隔

支持列间距。

行提供 gutter 属性来指定列之间的间距,其默认值为0。

混合布局

通过基础的 1/24 分栏任意扩展组合形成较为复杂的混合布局。

列偏移

可以指定列偏移量。

通过制定 col 组件的 offset 属性可以指定分栏偏移的栏数。

对齐方式

默认使用 flex 布局来对分栏进行灵活的对齐。

可以通过justify 属性来定义子元素的排版方式,其取值为startcenterendspace-betweenspace-aroundspace-evenly

Row API

Row Slots

属性名说明类型默认值
gutter栅格间隔number0
justifyflex 布局下的水平排列方式start center end space-between space-around space-evenlystart

Row Slots

插槽名说明子标签
default自定义默认内容Col

Col API​

Col Attributes

属性名说明类型默认值
span栅格占据的列数number24
offset栅格左侧的间隔格数number0

Col Slots

插槽名说明
default自定义默认内容

基于 MIT 许可发布