Procházet zdrojové kódy

答题swiper,禁止手动滑动

hanchong před 1 rokem
rodič
revize
6f3e69fcc7
2 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 3 0
      pages/testSAS/testSAS.js
  2. 1 1
      pages/testSAS/testSAS.wxml

+ 3 - 0
pages/testSAS/testSAS.js

@@ -52,6 +52,9 @@ Page({
   //     // 结束绘制并更新 canvas  
   //     ctx.draw();  
   //   },
+  handleTouchMove: function() {  
+      return false; // 阻止手动滑动  
+    }, 
     hideModal: function() {  
       this.setData({  
         privacyDetailShow: false

+ 1 - 1
pages/testSAS/testSAS.wxml

@@ -49,7 +49,7 @@
 	<view class='idX'>睡眠调查问卷</view>
     <swiper class='sheet' current='{{id}}'>
       <block wx:for="{{qnaire}}">
-        <swiper-item>
+        <swiper-item catchtouchmove="handleTouchMove">
           <form bindsubmit='submit'>
             <view class='naire' wx:if="{{item.type == 'radio'}}">
               <view class='question'>{{item.question}}</view>