You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.6 KiB

2 years ago
  1. <template>
  2. <v-app>
  3. <NavBar />
  4. <v-main>
  5. <Nuxt />
  6. </v-main>
  7. <Footer />
  8. <customNotifications></customNotifications>
  9. <customMessenger></customMessenger>
  10. </v-app>
  11. </template>
  12. <script>
  13. import NavBar from "../components/NavBar.vue";
  14. import Footer from "../components/Footer.vue";
  15. import customNotifications from "@/components/newComponent/notifications/notifications.vue";
  16. import customMessenger from "@/components/fb-messenger/customMessenger.vue";
  17. export default {
  18. name: "DefaultLayout",
  19. components: {
  20. Footer,
  21. NavBar,
  22. customNotifications,
  23. customMessenger,
  24. },
  25. data() {
  26. return {};
  27. },
  28. computed: {
  29. drawerAcitve() {
  30. return this.$store.getters.getDrawerStatus;
  31. },
  32. searchDialogActive() {
  33. return this.$store.getters.getSearchDialogStatus;
  34. }
  35. },
  36. watch: {
  37. drawerAcitve: {
  38. handler: function () {
  39. this.bsd(this.drawerAcitve);
  40. }
  41. },
  42. searchDialogActive: {
  43. handler: function () {
  44. this.bsd(this.searchDialogActive);
  45. }
  46. }
  47. },
  48. methods: {
  49. bsd(status) {
  50. var body = document.querySelector("body");
  51. var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
  52. var scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;
  53. window.onscroll = function () { };
  54. if (status === true) {
  55. if (window.onscroll !== null) {
  56. window.onscroll = function () {
  57. window.scrollTo(scrollLeft, scrollTop);
  58. };
  59. }
  60. } else {
  61. window.onscroll = function () { };
  62. }
  63. }
  64. }
  65. };
  66. </script>
  67. <style lang="scss" scoped>
  68. </style>