CorpusItem.vue 816 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <article class="corpus 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. <div class="text-quantity" v-html="item.textsQuantity" />
  14. </article>
  15. </template>
  16. <script>
  17. export default {
  18. name: 'CorpusItem',
  19. props: {
  20. item: {
  21. type: Object,
  22. required: true
  23. }
  24. },
  25. data: () => ({
  26. }),
  27. methods: {
  28. onclick () {
  29. console.log('clicked on corpus item', this.item)
  30. // this.$router.push({
  31. // name:`article`,
  32. // params: { alias:this.alias },
  33. // query: { uuid: this.item.uuid }
  34. // // meta: { uuid:this.item.uuid },
  35. // })
  36. }
  37. }
  38. }
  39. </script>
  40. <style lang="scss" scoped>
  41. </style>