Sfoglia il codice sorgente

修复绝对定位无法滑动的问题

panxiandiao_i 5 anni fa
parent
commit
c59ad2a89b
1 ha cambiato i file con 9 aggiunte e 1 eliminazioni
  1. 9 1
      src/views/Platform/defectManagement.vue

+ 9 - 1
src/views/Platform/defectManagement.vue

@@ -1,5 +1,5 @@
 <template>
-  <div style="position:relative">
+  <div id="init-window" style="position:relative">
     <router-view />
     <!--缺陷管理-->
     <div style="position: absolute;width: 100%;">
@@ -302,8 +302,16 @@ export default {
   },
   mounted() {
     this.getQueryData()
+    this.initWindow()
   },
   methods: {
+    initWindow() {
+      if (!document.getElementById('window-judge')) {
+        document.getElementById('init-window').parentNode.style.overflow = 'auto'
+      } else {
+        document.getElementById('init-window').parentNode.style.overflow = 'hidden'
+      }
+    },
     getList() {
       this.bizJson = localStorage.getItem('key')
       this.indexPage = {