<template> | <template> | ||||
<div id="app" @touchstart="startEvent" @touchend="endEvent"> | <div id="app" @touchstart="startEvent" @touchend="endEvent"> | ||||
<transition name="fade"> | <transition name="fade"> | ||||
<router-view /> | |||||
<router-view/> | |||||
</transition> | </transition> | ||||
<btn-music :bgLoop="bgLoop"></btn-music> | <btn-music :bgLoop="bgLoop"></btn-music> | ||||
<!-- <sidebar style="position: absolute;top: 20vw;left: 10vw;"></sidebar> --> | <!-- <sidebar style="position: absolute;top: 20vw;left: 10vw;"></sidebar> --> | ||||
height: 100%; | height: 100%; | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
.middleContainer { | .middleContainer { | ||||
position: absolute; | position: absolute; | ||||
width: 100%; | width: 100%; |
}); | }); | ||||
all.addEventListener("touchmove",function () { | all.addEventListener("touchmove",function () { | ||||
let scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop; | 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(); | event.preventDefault(); | ||||
} | } | ||||
},false); | },false); |