Skip to content

m-gap 占位间距

简述

占位空白间距,用于拉开元素距离。

注意

请以 uni_modules/m-unix 与本文为准;各端差异以 uni-app 与各平台官方文档为准。涉及隐私能力(相册、定位、剪贴板、手机号等)需在 manifest 与后台完成配置。

平台差异说明

App(vue)App(nvue)H5小程序

演示地址

与线上 H5 演示基座 分包一致(文档站右下角预览 iframe 亦指向同一路径)。

类型地址
分包路径pages_demo/extensions/extensions
线上 H5(hash)打开演示

基本使用

uvue
<template>
	<view>
		<view>内容</view>
		<m-gap></m-gap>
		<view>内容</view>
	</view>
</template>

Props

参数说明类型默认值
height高度,单位 rpxnumber20
background背景颜色stringtransparent

示例

间距 20rpx

uvue
<view>A</view>
<m-gap></m-gap>
<view>B</view>

间距 50rpx

uvue
<view>A</view>
<m-gap :height="50"></m-gap>
<view>B</view>

Released under the MIT License.