Q-ABAB 2 years ago
parent
commit
ef7ec582bb
2 changed files with 7 additions and 5 deletions
  1. 3 3
      src/App.vue
  2. 4 2
      src/views/resultShow/resultShowDetail.vue

+ 3 - 3
src/App.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="page core_dialogue">
+  <div ref="app" class="page core_dialogue">
       <el-header v-if="$route.meta.isAuth">
         <img src="./assets/img/sclogo4.png" alt="">
         <!-- <img src="@/assets/img/szjsxy.png" alt=""> -->
@@ -8,7 +8,7 @@
           <div class="homeExit" @click="homeExit">退出</div>
         </div>
       </el-header>
-    <router-view></router-view>
+    <router-view ></router-view>
   </div>
 </template>
 
@@ -181,7 +181,7 @@
   // 滚动条样式
   .core_dialogue {
       height: 100%;
-      overflow: scroll;
+      overflow: overlay;
     }
     .core_dialogue::-webkit-scrollbar-track-piece {
       background-color: #f8f8f800;

+ 4 - 2
src/views/resultShow/resultShowDetail.vue

@@ -1,6 +1,6 @@
 <template>
     <!-- 成果展示 项目成果展示 -->
-    <div class="rs1apply core_dialogue">
+    <div class="rs1apply">
         <!-- 头部展示区开始 -->
         <div class="header">
             <div class="imgBlock">
@@ -543,9 +543,11 @@
         mounted(){
             //监听元素滚动
             let Nav = document.querySelector("#Nav");
-            document.querySelector(".rs1apply").addEventListener("scroll",(e)=>{
+            document.querySelector(".core_dialogue").addEventListener("scroll",(e)=>{
+                console.log()
                 let scrollTop = e.target.scrollTop;
                 if(scrollTop>=200){
+                    // document.querySelector(".core_dialogue").querySelector('.el-header').style.display='display:fi'
                     Nav.style = `width:100%;padding:0 20%;box-sizing: border-box;border-radius:0;display:flex;justify-content: space-around;position: fixed;top:calc(70px - 20px);z-index:99;align-items: center;box-shadow: 0 0 5px gray;`
                 }else if(scrollTop<=100){
                     Nav.style = ``