滚动条

 

created(){
    document.addEventListener('scroll', this.handleScroll)
  },
  beforeDestroy () {
    document.removeEventListener('scroll', this.handleScroll);
  },
  methods: {
    handleScroll(){
        var a = document.getElementsByClassName('ted-header')[0].offsetHeight;
        console.log(window.pageYOffset,a)
    },
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-30
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案