Преглед изворни кода

移动端书写禁止滑动

natasha пре 9 месеци
родитељ
комит
0c806ee06b

+ 1 - 1
src/components/Adult/preview/ArticleViewChs/PhraseModelChs.vue

@@ -1552,7 +1552,7 @@ export default {
     left: 50%;
     max-width: 100%;
     overflow: auto;
-
+    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.15);
     //   width: 260px;
     //   height: 200px;
     //   background: #cc0;

+ 1 - 0
src/components/Adult/preview/ArticleViewChs/WordModelChs.vue

@@ -1261,6 +1261,7 @@ export default {
   left: 50%;
   max-width: 100%;
   overflow: auto;
+  box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.15);
   //   width: 260px;
   //   height: 200px;
   //   background: #cc0;

+ 1 - 0
src/components/Adult/preview/DialogueArticleViewChs/PhraseModelChs.vue

@@ -1335,6 +1335,7 @@ export default {
     left: 50%;
     max-width: 100%;
     overflow: auto;
+    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.15);
   }
 }
 </style>

+ 1 - 0
src/components/Adult/preview/DialogueArticleViewChs/WordModelChs.vue

@@ -1193,6 +1193,7 @@ export default {
   left: 50%;
   max-width: 100%;
   overflow: auto;
+  box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.15);
   //   width: 260px;
   //   height: 200px;
   //   background: #cc0;

+ 1 - 1
src/components/Adult/preview/NewWordShow.vue

@@ -124,7 +124,7 @@
       v-if="isPraShow"
     >
       <Practice
-        :change-pra-show="changePraShow"
+        @changePraShow="changePraShow"
         :cur="curData"
         :theme-color="themeColor"
       />

+ 14 - 1
src/components/Adult/preview/components/Practice.vue

@@ -7,7 +7,7 @@
       v-for="(item, index) in cur.stem"
     >
       <img
-        @click="changePraShow()"
+        @click="changePraShows"
         class="close-icon"
         :src="
           themeColor
@@ -397,6 +397,14 @@ export default {
     saveWriteAnswer(data) {
       let answer = JSON.parse(JSON.stringify(data));
       this.$emit("changeCurQue", answer);
+    },
+    changePraShows() {
+      var mo = function(e) {
+        e.preventDefault();
+      };
+      document.body.style.overflow = ""; //出现滚动条
+      document.removeEventListener("touchmove", mo, false);
+      this.$emit("changePraShow");
     }
   },
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -421,6 +429,11 @@ export default {
         }, 0);
       }
     });
+    var mo = function(e) {
+      e.preventDefault();
+    };
+    document.body.style.overflow = "hidden";
+    document.addEventListener("touchmove", mo, false); //禁止页面滑动
   },
   beforeCreate() {}, //生命周期 - 创建之前
   beforeMount() {}, //生命周期 - 挂载之前

+ 1 - 1
src/components/Adult/preview/components/Wordcard.vue

@@ -188,7 +188,7 @@
       >
         <!-- <div class="practiceBox practiceBoxStrock" v-if="isPraShow"> -->
         <Practice
-          :changePraShow="changePraShow"
+          @changePraShow="changePraShow"
           :cur="curData"
           :themeColor="themeColor"
           :currentTreeID="currentTreeID"