1
0
mirror of https://gitlab.com/bramw/baserow.git synced 2024-11-24 16:36:46 +00:00
bramw_baserow/web-frontend/modules/database/components/preview/PreviewImage.vue

29 lines
458 B
Vue

<template>
<div class="preview__image-wrapper">
<div v-if="!loaded" class="preview__loading"></div>
<img
:src="url"
class="preview__image"
:class="{ 'preview--hidden': !loaded }"
@load="loaded = true"
/>
</div>
</template>
<script>
export default {
name: 'PreviewImage',
props: {
url: {
type: String,
required: true,
},
},
data() {
return {
loaded: false,
}
},
}
</script>