彈出 fixed 彈窗后,在彈窗上滑動會導致下層的頁面一起跟着滾動。
解決方法:
在彈出層加上 catchtouchmove 事件
兩種方法:(在電腦上測試是沒有用的,這是觸摸事件。因此,需要在手機端測試,預覽生成一個開發版,用手機微信掃描即可看到效果)
1.
wxml:
<!-- 首頁彈窗 -->
<view class='Popup' hidden='{{bool}}' catchtouchmove="test">
js:
test:function(){
},
2.catchtouchmove="true"就行了,(個人感覺第二種方法比較簡單,好用)
<!-- 首頁彈窗 -->
<view class='Popup' hidden='{{bool}}' catchtouchmove="true">

