mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +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>
51 lines
984 B
Vue
51 lines
984 B
Vue
<template>
|
|
<div
|
|
v-tooltip="selected ? value.visible_name : null"
|
|
class="array-field__file"
|
|
>
|
|
<a class="array-field__file-link" @click.prevent="onClick">
|
|
<img
|
|
v-if="value.is_image"
|
|
class="array-field__file-image"
|
|
:src="value.thumbnails?.tiny?.url"
|
|
/>
|
|
<i
|
|
v-else
|
|
class="array-field__file-icon"
|
|
:class="getIconClass(value.mime_type)"
|
|
></i>
|
|
</a>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { mimetype2icon } from '@baserow/modules/core/utils/fileTypeToIcon'
|
|
|
|
export default {
|
|
name: 'FunctionalFormulaFileArrayItem',
|
|
props: {
|
|
selected: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
value: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
index: {
|
|
type: null,
|
|
default: null,
|
|
},
|
|
},
|
|
emits: ['show'],
|
|
methods: {
|
|
getIconClass(mimeType) {
|
|
return mimetype2icon(mimeType)
|
|
},
|
|
onClick() {
|
|
this.$emit('show', this.index)
|
|
},
|
|
},
|
|
}
|
|
</script>
|