ExtractsToImage.vue 882 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <div>
  3. <template v-for="i in extractConfig.y">
  4. <v-layout row wrap :key="`row-${i}`">
  5. <v-flex
  6. v-for="(anExtract, index) in extractsSliced(i)"
  7. :key="`extract-${i}-${extractConfig.x}-${extractConfig.y}-${index}-${anExtract.quality}`"
  8. class="pa-0"
  9. >
  10. <v-card flat tile class="d-flex height100">
  11. <v-img :src="anExtract" />
  12. </v-card>
  13. </v-flex>
  14. </v-layout>
  15. </template>
  16. </div>
  17. </template>
  18. <script>
  19. export default {
  20. name: 'ExtractsToImage',
  21. props: {
  22. extractConfig: {
  23. type: Object,
  24. required: true
  25. },
  26. extracts: {
  27. type: Array,
  28. required: true
  29. }
  30. },
  31. computed: {
  32. extractsSliced() {
  33. return vForIndex => this.extracts.slice(this.extractConfig.x * (vForIndex - 1), (this.extractConfig.x * vForIndex))
  34. }
  35. }
  36. }
  37. </script>