分享一個(gè)uniapp中的懸浮按鈕,移動(dòng)端開發(fā)有時(shí)候會(huì)遇到懸浮按鈕的使用,它可以定位不同位置也可以配置展開菜單,菜單還可以插入圖片,菜單方向也可以設(shè)置,點(diǎn)擊事件的觸發(fā)等功能還是很全的
<template>
<view>
<uni-fab
:pattern="pattern"
:content="content"
:horizontal="horizontal"
:vertical="vertical"
:direction="direction"
@trigger="trigger"
></uni-fab>
</view>
</template>

2022-09-29_090827.png

2022-09-29_090837.png

2022-09-29_090852.png

2022-09-29_090929.png
詳細(xì)參數(shù)配置請(qǐng)參考官網(wǎng)https://uniapp.dcloud.net.cn/component/uniui/uni-fab.html#%E4%BB%8B%E7%BB%8D