fix: hide section if section.hidden is true, also hide first sections border top using css
This commit is contained in:
parent
b252f3a82e
commit
1389b92a34
@ -15,15 +15,14 @@
|
||||
!hasTabs ? 'hidden' : modal ? 'border-outline-gray-modals' : ''
|
||||
"
|
||||
>
|
||||
<div class="overflow-hidden" :class="{ 'my-4 sm:my-6': hasTabs }">
|
||||
<div
|
||||
v-for="(section, i) in tab.sections"
|
||||
:key="section.label"
|
||||
class="section"
|
||||
class="sections overflow-hidden"
|
||||
:class="{ 'my-4 sm:my-6': hasTabs }"
|
||||
>
|
||||
<template v-for="section in tab.sections" :key="section.name">
|
||||
<div v-if="!section.hidden" class="section" :data-name="section.name">
|
||||
<div
|
||||
v-if="i != 0"
|
||||
class="w-full"
|
||||
class="w-full section-border"
|
||||
:class="[section.hideBorder ? 'mt-4' : 'h-px border-t my-5']"
|
||||
/>
|
||||
<Section
|
||||
@ -36,7 +35,7 @@
|
||||
collapseIconPosition="right"
|
||||
>
|
||||
<div
|
||||
class="column flex gap-4"
|
||||
class="flex gap-4"
|
||||
:class="[
|
||||
{
|
||||
'px-3 sm:px-5': hasTabs,
|
||||
@ -45,9 +44,10 @@
|
||||
]"
|
||||
>
|
||||
<div
|
||||
class="flex flex-col gap-4 w-full"
|
||||
class="column flex flex-col gap-4 w-full"
|
||||
v-for="column in section.columns"
|
||||
:key="column.name"
|
||||
:data-name="column.name"
|
||||
>
|
||||
<div
|
||||
v-if="column.label && !column.hideLabel"
|
||||
@ -248,6 +248,7 @@
|
||||
</div>
|
||||
</Section>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</Tabs>
|
||||
</div>
|
||||
@ -344,4 +345,8 @@ const getPlaceholder = (field) => {
|
||||
.section:has(.settings-field) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sections .section:first-of-type .section-border {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user