oh-image-card: Fix inconsistent image size when action is defined (#3046)

Fixes #3002.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
pull/3041/head
jimtng 2025-02-15 21:58:53 +10:00 committed by GitHub
parent 6ce2d2e107
commit a7cc8f762c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<oh-card :context="context" :content-class="['oh-image-card', 'no-padding']"> <oh-card :context="context" :content-class="['oh-image-card', 'no-padding']">
<template #content-root> <template #content-root>
<f7-card-content :style="config.contentStyle" :class="[ ...(Array.isArray(config.contentClass) ? config.contentClass : []), 'oh-image-card', (config.action ? '' : 'no-padding')]"> <f7-card-content :style="config.contentStyle" :class="[ ...(Array.isArray(config.contentClass) ? config.contentClass : []), 'oh-image-card', 'no-padding']">
<f7-list v-if="config.action" class="image-link"> <f7-list v-if="config.action" class="image-link">
<f7-list-item class="oh-image-clickable" link="#" no-chevron @click="performAction"> <f7-list-item class="oh-image-clickable" link="#" no-chevron @click="performAction">
<oh-image slot="content-start" :context="childContext(context.component)" /> <oh-image slot="content-start" :context="childContext(context.component)" />
@ -29,6 +29,9 @@
display none display none
.oh-image .oh-image
margin-bottom 5px margin-bottom 5px
.card
.list
margin 0 !important
</style> </style>
<script> <script>