alex-sharoff-website/components/gallery/GalleryItemMixin.js
2023-11-11 10:34:31 +04:00

21 lines
439 B
JavaScript

export default {
props: {
category: {type: String, required: true},
image: {type: String, required: true},
thumbSize: {
type: Object,
required: true,
default: () => ({w: 0, h: 0})
},
},
computed: {
full_img_url: function () {
return `/gallery/${this.category}/${this.image}`
},
thumbnail_url: function () {
return `/gallery/${this.category}/thumbs/${this.image}`
},
}
}