如果彈出層沒有滾動事件:
<view wx:if="{{alert}}" catchtouchmove="myCatchTouch"> <template is="alert" data="{{alertData}}" /> </view>
myCatchTouch: function () { console.log('stop user scroll it!'); return; },
如果彈出層有滾動事件,那么在彈出層出現的時候給底部的containerView加上一個class 消失的時候移除。
<view class="{{showModalView?'tripList_root':''}}">
.tripList_root{ top:0px; left: 0px; width: 100%; height: 100%; overflow: hidden; position: fixed; z-index: 0; }