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
})
})
})
},
![8***@qq.com](http://img-cdn-tc.dcloud.net.cn/uploads/avatar/000/41/06/99_avatar_mid.jpg?v=0)
8***@qq.com
- 发布:2020-07-24 15:51
- 更新:2020-07-24 15:51
- 阅读:632
0 个回复