Browse Source

阻止滑动的默认的事件1

zhangyujun 3 years ago
parent
commit
b67137923c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/views/aprilExam/test.vue

+ 2 - 2
src/views/aprilExam/test.vue

@@ -489,10 +489,10 @@ let slideTopics = (() => {
       //单点触摸的时候
       if (touchList0.length == 1 && touchList1.length == 1) {
         console.log(touchList1[0].clientX - touchList0[0].clientX);
-        if (touchList1[0].clientX - touchList0[0].clientX > 160) {
+        if (touchList1[0].clientX - touchList0[0].clientX > -160) {
           nextTopics();
           touchList0 = e.changedTouches;
-        } else if (touchList1[0].clientX - touchList0[0].clientX < -160) {
+        } else if (touchList1[0].clientX - touchList0[0].clientX < 160) {
           backTopics();
           touchList0 = e.changedTouches;
         }