Skip to content

mms-sticky-bottom 粘性底部

简述

固定在窗口底部,适配 iPhone 安全区域。

注意

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

平台差异说明

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

基本使用

uvue
<template>
	<view>
		<mms-sticky-bottom>
			<mms-button type="primary" text="提交"></mms-button>
		</mms-sticky-bottom>
	</view>
</template>

Props

参数说明类型默认值
zIndex层级number998
safeAreaInsetBottom是否适配底部安全区域booleantrue
bgColor背景颜色string#ffffff

插槽

名称说明
default底部内容

示例

按钮放在粘性底部

uvue
<mms-sticky-bottom>
	<mms-button type="primary" text="确认提交" @click="submit"></mms-button>
</mms-sticky-bottom>

自定义背景色

uvue
<mms-sticky-bottom bgColor="#f5f5f5">
	<mms-button type="primary" text="确认提交"></mms-button>
</mms-sticky-bottom>

Released under the MIT License.