mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 16:28:31 +00:00
Update the nuxt3 version. Co-authored-by: Jonathan Adeline <jonathan@baserow.io> Co-authored-by: Bram Wiepjes <bramw@protonmail.com> Co-authored-by: Cezary <cezary@baserow.io> Co-authored-by: Tsering Paljor <tsering@baserow.io> Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io> Co-authored-by: Bram <bram2w@users.noreply.github.com>
38 lines
798 B
Vue
38 lines
798 B
Vue
<template>
|
|
<div class="grid-view__cell grid-field-file__cell">
|
|
<div v-if="value" class="grid-field-file__item">
|
|
<a class="grid-field-file__link">
|
|
<img
|
|
v-if="value.is_image"
|
|
class="grid-field-file__image"
|
|
:src="value?.thumbnails?.tiny?.url"
|
|
/>
|
|
<i
|
|
v-else
|
|
class="grid-field-file__icon"
|
|
:class="getIconClass(value.mime_type)"
|
|
></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { mimetype2icon } from '@baserow/modules/core/utils/fileTypeToIcon'
|
|
|
|
export default {
|
|
name: 'FunctionalGridViewSingleFile',
|
|
props: {
|
|
value: {
|
|
type: Object,
|
|
default: null,
|
|
},
|
|
},
|
|
methods: {
|
|
getIconClass(mimeType) {
|
|
return mimetype2icon(mimeType)
|
|
},
|
|
},
|
|
}
|
|
</script>
|