Browse Source

bug修复

master
suizhijia 5 years ago
parent
commit
881efe6e2d
2 changed files with 3 additions and 3 deletions
  1. +1
    -2
      src/App.vue
  2. +2
    -1
      src/utils/common.js

+ 1
- 2
src/App.vue View File

@@ -1,7 +1,7 @@
<template>
<div id="app" @touchstart="startEvent" @touchend="endEvent">
<transition name="fade">
<router-view />
<router-view/>
</transition>
<btn-music :bgLoop="bgLoop"></btn-music>
<!-- <sidebar style="position: absolute;top: 20vw;left: 10vw;"></sidebar> -->
@@ -141,7 +141,6 @@
height: 100%;
text-align: center;
}

.middleContainer {
position: absolute;
width: 100%;

+ 2
- 1
src/utils/common.js View File

@@ -48,7 +48,8 @@ function stopPullDown (){
});
all.addEventListener("touchmove",function () {
let scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
if(scrollTop==0 && event.touches[0].clientY>startSite && !that.$store.state.menuState){

if(scrollTop==0 && event.touches[0].clientY>startSite && !that.$store.state.menuState || all.scrollHeight-all.clientHeight==Math.ceil(scrollTop) && startSite>event.touches[0].clientY && !that.$store.state.menuState){
event.preventDefault();
}
},false);

Loading…
Cancel
Save