NavBar.vue 759 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <nav class="header-nav">
  3. <ul v-if="!loading" class="header-nav__list">
  4. <li class="header-nav__item" v-for="link in menuHeader" :key="link.url">
  5. <nuxt-link class="header-nav__link" :to="link.url">
  6. {{ link.title }}
  7. </nuxt-link>
  8. </li>
  9. </ul>
  10. <v-row v-else>
  11. <v-col v-for="n in 4" :key="n">
  12. <v-skeleton-loader class="mx-auto" type="button" width="60"></v-skeleton-loader>
  13. </v-col>
  14. </v-row>
  15. </nav>
  16. </template>
  17. <script>
  18. import { mapGetters } from "vuex";
  19. export default {
  20. data() {
  21. return {
  22. loading: true
  23. }
  24. },
  25. mounted() {
  26. this.loading = false
  27. },
  28. computed: {
  29. ...mapGetters({
  30. menuHeader: "modules/menu/menuHeader",
  31. }),
  32. },
  33. };
  34. </script>