Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
feat: Add preview on image field.
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt committed Nov 19, 2024
1 parent 5fc30cc commit a283be1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/ADempiere/FieldDefinition/FieldImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
class="image-file"
:alt="altImage"
:src="pathImage"
:preview-src-list="previewList"
lazy
fit="contain"
style="text-align: center ; height: 100px"
Expand Down Expand Up @@ -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()
},
Expand Down

0 comments on commit a283be1

Please sign in to comment.