export const scrollTopMixins = {
  mounted() {
    const $content = document.querySelector('#content');
    $content.addEventListener('scroll', () => {
      this.$route.meta.scrollTop = $content.scrollTop;
    });
  },
  activated() {
    const scrollTop = this.$route.meta.scrollTop;
    const $content = document.querySelector('#content');
    if (scrollTop && $content) {
      $content.scrollTop = scrollTop;
    }
  },
};
