小程序modal解决

 

data{

shareDialog:false,

}

<cover-view wx:if="{{shareDialog}}" class="list_tab"></cover-view>
<cover-view wx:if="{{shareDialog}}" class="mask_container">
<cover-image src='/images/detailModal.png' style="width:560rpx;height:640rpx;" bindtap="gotosupr"/>
<cover-image bindtap="hiddenMoadl" src='/images/close.png' style="width:80rpx;height:80rpx;margin-top:50rpx;" bindtap="hiddenMoadl"/>
</cover-view>

 

 

.list_tab{
position: fixed;
left: 0;
top: 0;
z-index: 999;
width: 100%;
height: 100vh;
background: #000000;
opacity: .7;
color: #ffffff;
}

 

 

.mask_container{
position: fixed;
top:100rpx;
left: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
display: flex;
flex-direction: column;
z-index:1000;
}

posted @ 2018-12-03 15:12  谢玉胜  阅读(679)  评论(0编辑  收藏  举报
@allenXieyusheng