Skip to content

悬浮按钮 ​

在页面固定位置显示一张可点击图片。

完整信封 ​

ts
{
    component: 'v2.floatbutton', text: '悬浮按钮', type: '3-9', active: true,
    props: { src: 'https://example.com/service.png', link: { httpType: 10, http: '/pages/service' }, position: { right: 0, bottom: 20 }, style: { width: 76, height: 76 } }
}

Props ​

字段类型默认值说明
srcstring''按钮图片
linkCmsV2Link空内链点击链接
position.rightnumber0距右百分比
position.bottomnumber20距下百分比
style.width/heightnumber76/76按钮尺寸,rpx

固定定位可能受宿主安全区和自定义 tabbar 影响,应在目标页面实测。跳转依赖 link service。

为 uni-app 商城与 CMS 场景设计