Support configurable visibility of semantic model cards (#2144)
Closes #2143. Only render model-card if `visible` computed property is `true`. Hide divs in model-tabs which do not have a visible model-card. Signed-off-by: Thomas Wunschel <thomas.wunschel@twistsolutions.de>pull/2150/head
parent
4f331b5702
commit
c2d071a9cf
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<f7-card expandable ref="card" class="model-card" :class="type + '-card'" :animate="$f7.data.themeOptions.expandableCardAnimation !== 'disabled'" card-tablet-fullscreen @card:opened="cardOpening" @card:closed="cardClosed">
|
||||
<f7-card v-if="visible" expandable ref="card" class="model-card" :class="type + '-card'" :animate="$f7.data.themeOptions.expandableCardAnimation !== 'disabled'" card-tablet-fullscreen @card:opened="cardOpening" @card:closed="cardClosed">
|
||||
<f7-card-content :padding="false">
|
||||
<div :class="(!backgroundImageUrl) ? `bg-color-${color}` : undefined" :style="{ height: `calc(var(--f7-safe-area-top) + ${headerHeight})` }">
|
||||
<f7-card-header :text-color="config.invertText ? 'black' : 'white'" class="display-block card-header" :style="{ height: `calc(var(--f7-safe-area-top) + ${headerHeight})` }">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="disable-user-select">
|
||||
<div class="disable-user-select model-tab">
|
||||
<div v-for="(elements, idx) in groups" :key="idx">
|
||||
<f7-block-title medium v-if="elements.length > 0 && elements[0].separator">
|
||||
{{ elements[0].separator }}
|
||||
|
@ -19,6 +19,8 @@
|
|||
</template>
|
||||
|
||||
<style lang="stylus">
|
||||
.model-tab > div:not(:has(.model-card))
|
||||
display none
|
||||
|
||||
.model-cards-section
|
||||
justify-content center
|
||||
|
|
Loading…
Reference in New Issue