更新记录

1.0.4(2023-06-09)

优化

1.0.3(2023-06-09)

增加预览二维码

1.0.2(2023-06-09)

增加预览

查看更多

平台兼容性

Vue2 Vue3
×
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
HBuilderX 3.1.0 × × × × ×
钉钉小程序 快手小程序 飞书小程序 京东小程序
× × × ×
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari
× × × × ×

liu-bubble-menu适用于uni-app项目的气泡菜单、气泡框组件

本组件目前兼容微信小程序、H5

本组件是非常简单好用的气泡菜单、气泡框,可点击任意位置弹出,可自定义气泡框大小、颜色、内容等

--- 扫码预览、关注我们 ---

扫码关注公众号,查看更多插件信息,预览插件效果!

使用方式

<template>
    <view class="page-main">
        <liu-bubble-menu elementId="data-select1" :dataList="dataList" @change="change1" bgColor="#666666">
            <view id="data-select1" class="item1">{{name1 || '示例一'}}</view>
        </liu-bubble-menu>

        <liu-bubble-menu elementId="data-select2" :dataList="dataList" @change="change2" bgColor="#ec622a" :dWidth="300"
            :dHeight="180">
            <view id="data-select2" class="item2">{{name2 || '示例二'}}</view>
        </liu-bubble-menu>

        <liu-bubble-menu elementId="data-select3" :dataList="dataList" @change="change3" bgColor="#333333" :dWidth="500"
            :dHeight="320">
            <view id="data-select3" class="item3">{{name3 || '示例三'}}</view>
        </liu-bubble-menu>

        <liu-bubble-menu elementId="data-select4" :dataList="dataList" @change="change4" bgColor="#5cb6f1" :dWidth="600"
            :dHeight="80">
            <view id="data-select4" class="item4">{{name4 || '示例四'}}</view>
        </liu-bubble-menu>
    </view>
</template>

<script>
    export default {
        data() {
            return {
                name1: '',
                name2: '',
                name3: '',
                name4: '',
                dataList: ['选项1', '选项2', '选项3', '选项4']
            }
        },
        methods: {
            change1(e) {
                this.name1 = e
            },
            change2(e) {
                this.name2 = e
            },
            change3(e) {
                this.name3 = e
            },
            change4(e) {
                this.name4 = e
            }
        }
    }
</script>

<style scoped>
    .item1 {
        width: 200rpx;
        height: 88rpx;
        border: solid #f0f0f0 1px;
        border-radius: 12rpx;
        line-height: 88rpx;
        text-align: center;
        right: 20rpx;
        top: 88rpx;
        position: fixed;
    }

    .item2 {
        width: 100rpx;
        height: 88rpx;
        border: solid #f0f0f0 1px;
        border-radius: 12rpx;
        line-height: 88rpx;
        text-align: center;
        left: 100rpx;
        top: 0rpx;
        position: absolute;
    }

    .item3 {
        width: 100rpx;
        height: 88rpx;
        border: solid #f0f0f0 1px;
        border-radius: 12rpx;
        line-height: 88rpx;
        text-align: center;
        left: 500rpx;
        bottom: 300rpx;
        position: fixed;
    }

    .item4 {
        width: 100rpx;
        height: 88rpx;
        border: solid #f0f0f0 1px;
        border-radius: 12rpx;
        line-height: 88rpx;
        text-align: center;
        left: 100rpx;
        bottom: 100rpx;
        position: fixed;
    }
</style>

属性说明

名称 类型 默认值 描述
elementId String 所点击元素id(必须传)
dataList Array [] 气泡框数据源
hasBar Boolean true 当前页面是否含有navigationBar
bgColor String #FFFFFF 气泡框背景色
radius Number 8 气泡框圆角(rpx)
dWidth Number 0 气泡框宽度(rpx),不传则默认取所点击元素的宽度
dHeight Number 0 气泡框高度(rpx),不传则默认由内容撑开
dMaxHeight Number 0 气泡框最大高度(rpx),超出则内部滚动
@change Function 点击选项回调事件

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

1、本插件可免费下载使用;

2、未经许可,严禁复制本插件派生同类插件上传插件市场;

3、未经许可,严禁在插件市场恶意复制抄袭本插件进行违规获利;

4、对本软件的任何使用都必须遵守这些条款,违反这些条款的个人或组织将面临法律追究。

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问