mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-23 17:50:38 +00:00
- image thumbnail fix in s3
- svg thumbnail fix
This commit is contained in:
@@ -64,9 +64,10 @@
|
||||
|
||||
<img
|
||||
class="h-full w-full rounded-lg object-cover shadow-lg"
|
||||
:src="entry.data.attributes.thumbnail.sm"
|
||||
:src="imageSrc"
|
||||
alt=""
|
||||
loading="lazy"
|
||||
@error="replaceByOriginal"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -157,6 +158,7 @@ export default {
|
||||
return {
|
||||
mobileMultiSelect: false,
|
||||
itemName: undefined,
|
||||
imageSrc: undefined,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -214,6 +216,14 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getImageSrc() {
|
||||
this.imageSrc = this.entry.data.attributes.mimetype === 'svg'
|
||||
? this.entry.data.attributes.file_url
|
||||
: this.entry.data.attributes.thumbnail.xs
|
||||
},
|
||||
replaceByOriginal() {
|
||||
this.imageSrc = this.entry.data.attributes.file_url
|
||||
},
|
||||
showItemActions() {
|
||||
this.$store.commit('CLIPBOARD_CLEAR')
|
||||
this.$store.commit('ADD_ITEM_TO_CLIPBOARD', this.entry)
|
||||
@@ -248,6 +258,8 @@ export default {
|
||||
document.execCommand('selectAll')
|
||||
}
|
||||
})
|
||||
|
||||
this.getImageSrc()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user