NominumItem.vue 750 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. >
  10. <span class="title" v-html="item.title" /> <span class="quantity">[{{ item.texts.length }}]</span>
  11. </a>
  12. </h1>
  13. </header>
  14. </article>
  15. </template>
  16. <script>
  17. export default {
  18. name: 'NominumItem',
  19. props: {
  20. item: {
  21. type: Object,
  22. required: true
  23. }
  24. },
  25. data: () => ({
  26. }),
  27. methods: {
  28. onclick () {
  29. console.log('clicked on nominum item', this.item)
  30. this.$router.push({
  31. name: `nominum`,
  32. params: { id: this.item.uuid }
  33. })
  34. }
  35. }
  36. }
  37. </script>
  38. <style lang="scss" scoped>
  39. </style>