Skip to content

Space 间距 ​

为一组并排或纵向排列的元素提供统一间距,避免手动编写零散外边距。

基础用法 ​

垂直排列与自定义间距 ​

第一项第二项
vue
<template>
  <VbSpace wrap :size="12">
    <VbButton type="primary">新增</VbButton>
    <VbButton type="soft">导出</VbButton>
  </VbSpace>
</template>

API ​

属性名说明类型默认值
direction排列方向'horizontal' | 'vertical''horizontal'
size间距大小(支持语义值、像素数值或 [水平, 垂直] 元组)'sm' | 'md' | 'lg' | number | [number, number]'md'
align交叉轴对齐方式'start' | 'center' | 'end' | 'baseline' | 'stretch''center'
justify主轴对齐方式'start' | 'center' | 'end' | 'between' | 'around''start'
wrap是否自动换行booleanfalse
fill是否占满容器宽度booleanfalse

基于 MIT 协议开源发布 · @vobo-design/ui v0.5.0