From a283be15aa77ec2722a5e8041f785afa06eeef55 Mon Sep 17 00:00:00 2001 From: EdwinBetanc0urt Date: Tue, 19 Nov 2024 15:06:35 -0400 Subject: [PATCH] feat: Add preview on image field. --- .../ADempiere/FieldDefinition/FieldImage.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/components/ADempiere/FieldDefinition/FieldImage.vue b/src/components/ADempiere/FieldDefinition/FieldImage.vue index 0a6f40f807..83e7e89a63 100644 --- a/src/components/ADempiere/FieldDefinition/FieldImage.vue +++ b/src/components/ADempiere/FieldDefinition/FieldImage.vue @@ -29,6 +29,7 @@ class="image-file" :alt="altImage" :src="pathImage" + :preview-src-list="previewList" lazy fit="contain" style="text-align: center ; height: 100px" @@ -291,6 +292,17 @@ export default { tableNameImage() { return this.currentTab.table_name.toLowerCase() }, + previewList() { + const imageSource = this.imageSourceSmall + if (!isEmptyValue(imageSource)) { + return [imageSource] + } + const newSoruce = this.pathImage + if (!isEmptyValue(newSoruce)) { + return [newSoruce] + } + return [] + }, columnNameImage() { return this.metadata.columnName.toLowerCase() },