外观
Gap 间隔槽
约 168 字小于 1 分钟
2025-10-31
该组件一般用于内容块之间的用一个灰色块隔开的场景,方便用户风格统一,减少工作量
基本使用
直接引入即可使用
- 通过
height配置高度,单位px - 通过
bgColor配置背景颜色
<template>
<un-gap height="80" bgColor="#bbb"></un-gap>
</template>
<script setup lang="ts">
// ...
</script>API
Props
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| bgColor | 背景颜色 | string | transparent(背景透明) |
| height | 间隔槽高度,单位px | string | number | 20 |
| marginTop | 与前一个元素的距离,单位px | string | number | 0 |
| marginBottom | 与后一个元素的距离,单位px | string | number | 0 |
