1.在自定义custom-tab-bar组件 index.js中添加 show 属性
data: {
show:true
}
2.在index.wxml中添加if语句
<view class="custom-tab" wx:if="{{show}}">
中间内容省略
</view>
3.在需要使用dialog前调用–隐藏tabbar
this.getTabBar().setData({
show: false,
});
4.在关闭dialog后 调用–显示tabbar
this.getTabBar().setData({
show: true,
});