用 catchtouchmove 事件来截获用户手动滑动事件,这样既解决了禁用手动滑动,又解决了有点击按钮不影响使用 。
以下为wxml文件:
<swiper current="{ {currentTab}}" class="swiper-box" duration="300" style="height:calc(100vh - 87rpx)" bindchange="bindChange">
<!-- 外来人员 -->
<swiper-item catchtouchmove='catchTouchMove'><!-- 禁止手动滑动-->
<scroll-view scroll-y="true" style="height: 100%;">
<navigator>
<view class="bottom-view">
<view class="list_item" bindtap="policeRecodsOnClick">
<!-- 左边图片(根据类型判断展示什么图片)-->
<view class="img_left">
<image mode="aspectFit" src="../../../images/person-img.png"></image&g