handleScroll() {
let objList = document.querySelectorAll('h2');
objList.forEach(function(el) {
let {top,bottom} = el.getBoundingClientRect();
let height = document.documentElement.clientHeight;
if(top < height && bottom > 0) {
el.classList.add('bounceInLeft');
} else {
el.classList.remove('bounceInLeft');
}
});
}
<parent>
<child :some_prop="parent_obj"></child>
</parent>
<script>
export default {
props: ['some_prop'],
data: function() {
return {
innerProp: {...this.some_prop}
}
}
}
</script>