index.wxml文件
<page-meta page-style="{{ fixedStyle }}" />
在van-popup上面的datePopupShow 绑定一个方法
<van-popup show="{{ datePopupShow }}" position="top" custom-style="width:100%;margin-top:{{navigationBarAndStatusBarHeight+30}}px;" bind:close="onClose" catchtouchmove='ture'>
</van-popup>
然后绑定下面的方法
//固定页面,禁止滚动 fixedStyle
/**
*
* @param that 当前页面对象
* @param status 当前弹出层的状态
*/
handlePageFixed(that,status){
if(status){
that.setData({
fixedStyle:"overflow:hidden;"
})
}else{
that.setData({
fixedStyle:""
})
}
},