Prechádzať zdrojové kódy

bugfix:补全index

XieXing 4 mesiacov pred
rodič
commit
e72f283844

+ 1 - 0
shudao-vue-frontend/src/components/MobilePdfViewer.vue

@@ -152,6 +152,7 @@ onUnmounted(() => {
   overflow-y: auto;
   -webkit-overflow-scrolling: touch;
   touch-action: pan-y;
+  overscroll-behavior: contain;
 }
 
 .loading-container, .error-container {

+ 10 - 1
shudao-vue-frontend/src/views/mobile/m-PolicyDocument.vue

@@ -193,7 +193,7 @@
 </template>
 
 <script setup>
-import { ref, computed, onMounted, onUnmounted } from "vue";
+import { ref, computed, onMounted, onUnmounted, watch } from "vue";
 import { useRouter } from "vue-router";
 import MobileHeader from "@/components/MobileHeader.vue";
 import MobilePdfViewer from "@/components/MobilePdfViewer.vue";
@@ -407,9 +407,18 @@ onMounted(() => {
 });
 
 onUnmounted(() => {
+    document.body.style.overflow = "";
     if (scrollTimer) clearTimeout(scrollTimer);
     if (searchTimer) clearTimeout(searchTimer);
 });
+
+watch(previewVisible, (val) => {
+    if (val) {
+        document.body.style.overflow = "hidden";
+    } else {
+        document.body.style.overflow = "";
+    }
+});
 </script>
 
 <style lang="less" scoped>