mounted() {
this.$nextTick(() => {
window.addEventListener('scroll', this.scrollWindow)
let title = document.querySelector("#title")
title.style.background = "#fff";
title.style.color = "#333";
let infoContent = this.$refs.infoContent;
this.infoContentHeight = infoContent.getBoundingClientRect().top
console.log(this.infoContentHeight);
})
},
scrollWindow() {
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
console.log(scrollTop)
},
destroyed() {
window.removeEventListener('scroll', this.scrollWindow)
},