友善
友善
  • 发布:2019-09-06 11:16
  • 更新:2019-09-06 11:16
  • 阅读:2046

【报Bug】uni.showmodal 同时弹出多个模态框

分类:uni-app

详细问题描述

handletouchmove: function(event) {
// console.log(event)
var _this = this;

                    let currentX = event.touches[0].pageX;  
                    let currentY = event.touches[0].pageY;  
                    let tx = currentX - this.lastX;  
                    let ty = currentY - this.lastY;  
                    let text = '';  
                    this.mindex = -1;  
                    console.log(currentX,currentY);  
                    //左右方向滑动  
                    if (Math.abs(tx) > Math.abs(ty)) {  
                        if (tx < 0) {  
                            text = '向左滑动';  
                            // console.log(_this.$refs.Zradio[0]);  

                            // _this.moveX = this.lastX;  
                            // console.log(_this.moveX);  
                            // _this.isflash = true;  
                            // _this.$refs.Zradio[0].flash(_this.moveX,_this.isflash);  
                            _this.$refs.Zradio[0].next('触发了');  
                        //  this.getList();  //调用列表的方法  
                        } else if (tx > 0) {  
                            text = '向右滑动';  
                            console.log(text);  
                            _this.$refs.Zradio[0].last('触发了');  
                        }  
                    }  
                    //上下方向滑动  
                    else {  
                        if (ty < 0) {  
                            text = '向上滑动';  

                        //  this.getList();  //调用列表的方法  
                        } else if (ty > 0) {  
                            text = '向下滑动';  

                        }  
                    }  

                    //将当前坐标进行保存以进行下一次计算  
                    this.lastX = currentX;  
                    this.lastY = currentY;  
                    this.text = text;  
                },  

当组件像右滑动时,发出子组件Zradio里的last方法:
last(){
uni.showModal({
title: '提示',
content:'当前已是第一题'
})
}
但是右滑过多 会同时触发多个模态框,需要一个个确认或取消
而且真机测试时,我设置的是点击view 触发uni.showmodal 我点击多次view也会弹出多个modal框

IDE运行环境说明

HBuilderX

[IDE版本号]19.9.6最新版

[windows版本号]win10

uni-app运行环境说明

[小程序]

联系方式

229753827

2019-09-06 11:16 负责人:无 分享
已邀请:

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