场景:页面可滚动,带浮层,浮层中含有scroll-view组件,浮层出现scroll-view滚动时会引起页面滚动。
期望:浮层内scroll-view内滚动时,页面不受影响。
代码片段已提供,wxml部分如下:
<view class="container">
<view wx:for="{{views}}" wx:key="index" class="view-item" bindtap="handleClick" data-index="{{index}}">
View {{index + 1}}
</view>
</view>
<view
wx:if="{{show}}"
class='popup'
bind:tap="handleClick"
catchtouchmove="true">
<scroll-view scroll-y="{{true}}" class="scroll" catchtouchmove="handleTouchMove" bindscrolltolower="loadMore">
<view class="scroll-item" wx:for="{{scrollViews}}" wx:key="index">
Scroll Item {{index + 1}}
</view>
</scroll-view>
</view>
两种方式:
https://developers.weixin.qq.com/community/develop/article/doc/000886e3d182a8c8d00ca216e5fc13