lvlvlv
lvlvlv
  • 发布:2020-08-14 14:58
  • 更新:2020-08-14 18:07
  • 阅读:1951

【报Bug】部分机型下 uni-popup 多次调用后,会出现调不起并且页面卡死的现象

分类:uni-app

产品分类: uniapp/小程序/微信

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: w10

HBuilderX类型: 正式

HBuilderX版本号: 2.6.16

第三方开发者工具版本号: 1.02.1911180

基础库版本号: 2.9.2

项目创建方式: HBuilderX

示例代码:
  <!-- 扫码添加  出现多个商品时的选择弹窗 -->  
        <uni-pop class="pop-max" ref="showScanGoods" :type="'center'" :mask-click="false">  
            <view class="modal-max">  
                <view class="title">请选择你需要的商品并确定</view>  
                <scroll-view scroll-y="true" class="scroll-Y">  
                    <view class="ul">  
                        <view class="li flexbetween" v-for="(item,index) in existProudctList" :key="index">  
                            <view class="chek" @tap="radioChange(index)">  
                                <checkbox :checked="item.checked" />  
                            </view>  
                            <view class="name">  
                                {{ item.itemName}}  
                            </view>  
                            <view class="unit">  
                                {{item.unitName}}  
                            </view>  
                            <view class="price">  
                                {{item.retailPrice}}  
                            </view>  
                        </view>  
                    </view>  
                </scroll-view>  

                <view class="max-btn">  
                    <view @tap="modalMaxClose" class="left">取消</view>  
                    <view @tap="modalMaxOk" class="right">确定</view>  
                </view>  
            </view>  
        </uni-pop>
//这里是正常的 打开,关闭  
   toScan() {  
                let that = this;  
                uni.scanCode({  
                    scanType: ['barCode'],  
                    success: function (res) {  
                        console.log('条码类型:' + res.scanType);  
                        console.log('条码内容:' + res.result);  
                        if (res.result) {  
                            //that.getScanGoods(res.result);  
                            that .$refs['showScanGoods'].open();  
                        }  
                    }  
                });  
            },  
 modalMaxClose() {  
         this.$refs['showScanGoods'].close();  
 },  
 modalMaxOk() {  
         this.$refs['showScanGoods'].close();  
 },

操作步骤:

1.部分机型多次调用弹窗后出现
2.调用弹窗失败,页面卡死,无法点击
3.页面无报错,头部导航可以返回

预期结果:

每次调用正常弹出

实际结果:

部分机型多次调用弹窗后,无法弹出并且页面卡死,只能点击头部返回键。

bug描述:

目前测试有这款手机必定会出现这样的bug

  1. iphone 6 版本12.4.4,3次左右必然出现。
  2. 部分安卓手机
2020-08-14 14:58 负责人:DCloud_UNI_HT 分享
已邀请:
lvlvlv

lvlvlv (作者)

哦哦哦,用的popup插件太久远了,更新一下
或者插件 close、open方法里面修改一下

open() {   
    this.showPopup = true  
    this.showTrans = true  
    this.$nextTick(() => {  
        this.$emit('change', { show: true, type: this.type })  
    })},  

    close(type) {   
        this.showTrans = false   
        this.showPopup = false   
        this.$nextTick(() => { this.$emit('change', { show: false, type: this.type })  
    })},
chenli

chenli

使用npm包就是最新版本的@dcloudio/uni-ui

该问题目前已经被锁定, 无法添加新回复