mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
* 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>
57 lines
994 B
Vue
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>
|