分享一个uniapp中的悬浮按钮,移动端开发有时候会遇到悬浮按钮的使用,它可以定位不同位置也可以配置展开菜单,菜单还可以插入图片,菜单方向也可以设置,点击事件的触发等功能还是很全的
<template>
<view>
<uni-fab
:pattern="pattern"
:content="content"
:horizontal="horizontal"
:vertical="vertical"
:direction="direction"
@trigger="trigger"
></uni-fab>
</view>
</template>




详细参数配置请参考官网https://uniapp.dcloud.net.cn/component/uniui/uni-fab.html#%E4%BB%8B%E7%BB%8D
网友评论