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

feat: Add preview on image field. #2995

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading