There is the following component:
<template> <div class="header"> Header content </div> </template> <script> export default { } </script> <style> .header { position: fixed; top: 0; left: 0; height: 100px; width: 100%; } </style> Question: how to add a class header-hidden to div.header , if the height of the scroll is> 200px? Where in vue is it better to hang window.on handlers? And should they be destroyed when an item is destroyed?