更新记录

2.0.0(2024-06-28)

2.0.0

更新内容:

  1. 修复XPopup组件,退出页面重新进入无法再次弹出。
  2. 修复list弹窗点击返回值Int转number
  3. 修复了已知bug,优化了组件性能。
  4. 更新了文档,提供了更详细的说明和示例。

1.0.0(2024-06-26)

1.0.0


平台兼容性

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

wb-XPopup

开发文档

UTS 语法 UTS API插件 UTS 组件插件 Hello UTS

插件开发示例

注意:必须打包为自定义基座下载依赖(项目依赖 maven { url 'https://jitpack.io' })

<template>
    <view class="content">
        <button @click="newConfirm">显示确认和取消对话框</button>
        <button @click="newCenterList">显示中间弹出的列表弹窗</button>
        <button @click="newBottomList">显示从底部弹出的列表弹窗</button>
        <button @click="newCityPicker">城市选择器</button>
    </view>
</template>

<script>
    import { Confirm,CenterList,BottomList,CityPicker} from '@/uni_modules/wb-XPopup'
    export default {
        data() {
            return {
                title: 'Hello'
            }
        },
        onLoad() {

        },
        methods: {
            newConfirm() {
                let app =new Confirm()
                app.setTitleAndContent("提示","内容")
                app.setConfirmButtonText("确认",()=>{
                    console.log("确认触发");
                })
                app.setCancelButtonText("取消",false,()=>{
                    console.log("取消触发")
                })
                app.showConfirm()

            } ,
            newCenterList(){
                let app = new CenterList()
                let list =["item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1"] as string[]
                app.setTitleAndContent("提示",list)
                app.getOnSelectListener((index:number,text:string)=>{
                    console.log(index,text);
                })
                app.showCenterList()
            },
            newBottomList(){
                let app = new BottomList()
                let list =["item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1","item1"] as string[]
                app.setTitleAndContent("提示",list)
                app.getOnSelectListener((index:number,text:string)=>{
                    console.log(index,text);
                })
                app.showCenterList()
            },
            newCityPicker(){
                let app = new CityPicker()
                app.getCancel(()=>{
                    console.log("取消");
                })
                app.getChange((province:string,city:string,area:string)=>{
                    console.log("滚动");
                    console.log(province,city,area); 
                })
                app.getCityConfirm((province:string,city:string,area:string)=>{
                    console.log("确认");
                    console.log(province,city,area);
                })
                app.showCityPicker()
            }
        }
    }
</script>

隐私、权限声明

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

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

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

暂无用户评论。

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