如下图所示:
判断如果是tabbar页面时,在弹窗出现时隐藏tabbar,弹窗关闭时显示tabbar
uni-popup.vue修改如下:
computed: {
// 是否tabbar
isTabbar() {
const tabbarList = ['/pages/home/home', '/pages/member/member']
const url = '/' + uni.$util.getCurrentRoute()
return tabbarList.includes(url)
}
}
methods: {
open(){
xxxxxxx
if (this.isTabbar) {
uni.hideTabBar();
}
},
close(){
xxxxxxx
if (this.isTabbar) {
uni.showTabBar();
}
}
}
修改后如下图所示: