mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
19 lines
463 B
Vue
19 lines
463 B
Vue
<template>
|
|
<img id="printable-file" class="file" :class="{ 'file-shadow': !$isMobile() }" :src="imageSource" />
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'ImageFile',
|
|
props: ['file'],
|
|
computed: {
|
|
imageSource() {
|
|
let windowWidth = window.innerWidth
|
|
|
|
if (windowWidth > 1280) return this.file.data.attributes.thumbnail.xl
|
|
else return this.file.data.attributes.thumbnail.lg
|
|
},
|
|
},
|
|
}
|
|
</script>
|