NominumItem.vue 662 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <article class="nominum item">
  3. <header>
  4. <h1>
  5. <a
  6. :href="item.url"
  7. @click.prevent="onclick"
  8. @keyup.enter="onclick"
  9. v-html="item.title"
  10. />
  11. </h1>
  12. </header>
  13. </article>
  14. </template>
  15. <script>
  16. export default {
  17. name: 'NominumItem',
  18. props: {
  19. item: {
  20. type: Object,
  21. required: true
  22. }
  23. },
  24. data: () => ({
  25. }),
  26. methods: {
  27. onclick () {
  28. console.log('clicked on nominum item', this.item)
  29. this.$router.push({
  30. name: `nominumItem`,
  31. query: { id: this.item.uuid }
  32. })
  33. }
  34. }
  35. }
  36. </script>
  37. <style lang="scss" scoped>
  38. </style>