//App.vue
onLaunch: function() {
let _this = this;
//底部菜单中间按钮被点击的时候 显示遮罩层
uni.onTabBarMidButtonTap(()=>{
let subNVue = uni.getSubNVueById('send')
subNVue.show('slide-in-bottom', 300, function(){});
uni.$emit('onTabBarMidButtonTap',{})
})
},
//pages.json
{
"path" : "pages/index/index",
"style" : {
"navigationBarTitleText":"消息列表",
"navigationBarShadow" : "grey",
"app-plus": {
"scrollIndicator" : "none",
"subNVues":[{//弹出层
"id": "send",
"path": "pages/subnvue/send",
"type" : "popup",
"style": {
"height" : "100%",
"background": "transparent",
"popGesture": "none"
}
}]
}
}
}
//send.nvue
//关闭遮罩层
closeMask() {
let _this = this
let subNVue = uni.getSubNVueById('send')
subNVue.hide('slide-out-bottom', 300)
_this.animationData = {}
_this.mask = false
},
yygg
- 发布:2020-08-09 16:57
- 更新:2021-11-15 14:24
- 阅读:1106