ChapterHeader.vue 733 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <template>
  2. <v-tabs centered>
  3. <v-tab :to="`${pathPrefix}/tutorial`" nuxt>
  4. {{ $t('learning.header.tutorial') }}
  5. </v-tab>
  6. <v-tab :to="`${pathPrefix}/exercise`" nuxt>
  7. {{ $t('learning.header.exercise') }}
  8. </v-tab>
  9. <v-tab :to="`${pathPrefix}/playground`" nuxt>
  10. {{ $t('learning.header.playground') }}
  11. </v-tab>
  12. </v-tabs>
  13. </template>
  14. <script lang="ts">
  15. import Vue from 'vue'
  16. export default Vue.extend({
  17. props: {
  18. playground: {
  19. type: String,
  20. default: ''
  21. }
  22. },
  23. computed: {
  24. pathPrefix(): string {
  25. return `/learning/${this.$route.params.chapter}/${this.$route.params.level}`
  26. }
  27. }
  28. })
  29. </script>
  30. <style scoped>
  31. .v-tabs {
  32. background-color: #909090;
  33. }
  34. </style>