App.vue 905 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <div id="app">
  3. <main-header />
  4. <main id="main">
  5. <router-view :key="$route.path" />
  6. </main>
  7. <nodes-history />
  8. </div>
  9. </template>
  10. <script>
  11. import MainHeader from '@/pages/_partials/MainHeader'
  12. import NodesHistory from '@/pages/_partials/NodesHistory'
  13. export default {
  14. name: 'App',
  15. components: {
  16. MainHeader,
  17. NodesHistory
  18. },
  19. created () {
  20. if (!this.$store.state.pages.visited) {
  21. this.$router.push({ name: 'introduction' })
  22. }
  23. },
  24. metaInfo () {
  25. return {
  26. // if no subcomponents specify a metaInfo.title, try to get one from the route name.
  27. title: this.$t('sections.' + this.$route.name, ''),
  28. // all titles will be injected into this template
  29. titleTemplate: '%s | ' + this.$t('title')
  30. }
  31. }
  32. }
  33. </script>
  34. <style lang="scss">
  35. @import '@/assets/scss/app.scss';
  36. </style>
  37. <style lang="scss" scoped>
  38. </style>