Nominum.vue 954 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <MainContentLayout id="nominum">
  3. <template v-slot:header>
  4. <h1 v-if="content">{{ content.title }}</h1>
  5. <span v-if="!content">Loading ...</span>
  6. </template>
  7. <template v-slot:nav />
  8. </MainContentLayout>
  9. </template>
  10. <script>
  11. import { REST } from 'api/rest-axios'
  12. import MainContentLayout from '../components/Layouts/MainContentLayout'
  13. export default {
  14. name: 'Nominum',
  15. components: {
  16. MainContentLayout
  17. },
  18. data: () => ({
  19. content: null
  20. }),
  21. beforeCreate () {
  22. console.log('nominum this.$route', this.$route)
  23. REST.get(`/indexNominum/` + this.$route.params.id, {})
  24. .then(({ data }) => {
  25. console.log('nominum REST: data', data)
  26. if (data.content) {
  27. this.content = data.content
  28. }
  29. })
  30. .catch((error) => {
  31. console.warn('Issue with nominum', error)
  32. Promise.reject(error)
  33. })
  34. }
  35. }
  36. </script>
  37. <style lang="scss" scoped>
  38. </style>