Files
Jonathan Adelineandpeter_baserow 062a3f829d feat: add onClick and onChange events to more elements (#6686)
* feat(builder): add click events to images, text and headings

* fix(builder): allow element clicks to dismiss menus

* feat(builder): add click actions to columns and containers

* fix(builder): isolate nested interactive controls

* feat(builder): add selection change events

* test(builder): complete event fixtures for CI

* fix: keep heading semantics and limit click areas on clickable builder elements

---------

Co-authored-by: peter_baserow <peter@baserow.io>
2026-11-17 10:27:34 +04:00

57 lines
994 B
Vue

<template>
<div class="ab-image">
<img
class="ab-image__img"
:alt="alt"
:src="src"
:loading="lazy ? 'lazy' : null"
v-bind="imageAttributes"
/>
</div>
</template>
<script>
/**
* @typedef ABImage
*/
export default {
name: 'ABImage',
props: {
/**
* @type {String} - Alternative text to image.
*/
alt: {
type: String,
required: false,
default: '',
},
/**
* @type {String} - Image url.
*/
src: {
type: String,
required: false,
default: '',
},
/**
* @type {Boolean} - Whether the image should be loaded lazily.
*/
lazy: {
type: Boolean,
required: false,
default: true,
},
/**
* @type {Object} - Extra attributes and listeners for the image itself, such
* as the ones that make it clickable.
*/
imageAttributes: {
type: Object,
required: false,
default: () => ({}),
},
},
}
</script>