TandoorRecipes/vue/src/components/ImageViewer.vue
2021-01-13 02:16:16 +01:00

29 lines
447 B
Vue

<template>
<div>
<img :src="pdfUrl" width="100%" height="700px" :alt="_('External Recipe Image')">
</div>
</template>
<script>
import {GettextMixin, resolveDjangoUrl} from "@/utils/utils";
export default {
name: 'ImageViewer',
mixins: [
GettextMixin,
],
props: {
recipe: Object,
},
computed: {
pdfUrl: function() {
return resolveDjangoUrl('api_get_recipe_file', (this.recipe.id))
}
},
}
</script>