更新记录

1.0.0(2025-09-12) 下载此版本

发布v1.0.0。


平台兼容性

uni-app

Vue2 Vue3 Chrome Safari app-vue app-nvue Android iOS 鸿蒙
- - - - - - -
微信小程序 支付宝小程序 抖音小程序 百度小程序 快手小程序 京东小程序 鸿蒙元服务 QQ小程序 飞书小程序 快应用-华为 快应用-联盟
- - - - - - - - - - -

bcr-picker

工欲善其事必先利其器

对话框的形式选择数据,列表以 code 与 name 形式显示。

使用

<template>
    <view>
        <button class="open-btn" @tap="showPopup = true">打开弹窗</button>
        <bcrPicker
            placeholder="请输入"
            :show="showPopup" 
            :items="items" 
            @close="showPopup = false" 
            @select="onItemSelect">
        </bcrPicker>
    </view>
</template>
<script>
    import bcrPicker from '../../uni_modules/bcr-picker/components/bcr-picker/index.vue';
    export default {
        components: {
            bcrPicker
        },
        data() {
            showPopup: false,
            selectedItem: null,
            items: []
        },
        methods: {
            onItemSelect(item) {
                console.log('选中项:', item);
                this.selectedItem = item;
                uni.showToast({
                    title: `已选择: ${item.name}`,
                    icon: 'success',
                    duration: 2000
                });
            }
        }
    }
</script>

Props

参数 说明 类型 默认值 可选值
show 是否显示弹窗 Boolean false true
items 数据集合, item由 code - name 组成 Array - -
maskClose 点击遮罩层关闭弹窗 Boolean false true

隐私、权限声明

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

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

插件不采集任何数据

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

许可协议

MIT协议

暂无用户评论。