8***@qq.com
8***@qq.com
  • 发布:2020-07-24 15:51
  • 更新:2020-07-24 15:51
  • 阅读:548

安卓4.4版本 官方的 弹窗组件 数据更新 视图不更新怎么解决

分类:uni-app
open() {  
                **//使用了this.$nextTick+this.$forceUpdate();还是不行  

                this.$nextTick(() => {  
                    new Promise(resolve => {  
                        clearTimeout(this.timer)  
                        this.timer = setTimeout(() => {  
                            this.showPopup = true  
                            this.showTrans = true  
                            this.$forceUpdate()  
                            console.log(this.showPopup,this.showTrans)  
                            // fixed by mehaotian 兼容 app 端  
                            this.$nextTick(() => {  
                                resolve();  
                            })  
                        }, 50);  
                    }).then(res => {  
                        // 自定义打开事件  
                        clearTimeout(this.msgtimer)  
                        this.msgtimer = setTimeout(()=>{  
                            this.customOpen && this.customOpen()  
                        },100)  
                        this.$emit('change', {  
                            show: true,  
                            type: this.type  
                        })  
                    })  
                })  
            },
2020-07-24 15:51 负责人:无 分享
已邀请:

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