You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

common.js 562B

5 yıl önce
5 yıl önce
12345678910111213141516
  1. function stopPullDown (){
  2. let that = this;
  3. let all = document.getElementById("app");
  4. let startSite = 0;
  5. all.addEventListener("touchstart",function () {
  6. startSite=event.touches[0].clientY;
  7. });
  8. all.addEventListener("touchmove",function () {
  9. let scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
  10. if(scrollTop==0 && event.touches[0].clientY>startSite && !that.$store.state.menuState){
  11. event.preventDefault();
  12. }
  13. },false);
  14. }
  15. export {stopPullDown};