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 | 是否自动换行 | boolean | false |
fill | 是否占满容器宽度 | boolean | false |