fix: hide section if there is no fields in it
This commit is contained in:
parent
6208ede8ff
commit
82d608b3e9
@ -7,7 +7,7 @@
|
||||
v-for="field in _fields"
|
||||
:key="field.label"
|
||||
:class="[field.hidden && 'hidden']"
|
||||
class="flex items-center gap-2 px-3 leading-5 first:mt-3"
|
||||
class="section-field flex items-center gap-2 px-3 leading-5 first:mt-3"
|
||||
>
|
||||
<Tooltip :text="__(field.label)" :hoverDelay="1">
|
||||
<div class="sm:w-[106px] w-36 shrink-0 truncate text-sm text-gray-600">
|
||||
|
||||
@ -116,7 +116,7 @@
|
||||
<div
|
||||
v-for="(section, i) in fieldsLayout.data"
|
||||
:key="section.label"
|
||||
class="flex flex-col p-3"
|
||||
class="section flex flex-col p-3"
|
||||
:class="{ 'border-b': i !== fieldsLayout.data.length - 1 }"
|
||||
>
|
||||
<Section :is-opened="section.opened" :label="section.label">
|
||||
@ -705,3 +705,12 @@ function openEmailBox() {
|
||||
activities.value.emailBox.show = true
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep(.section:has(.section-field.hidden)) {
|
||||
display: none;
|
||||
}
|
||||
:deep(.section:has(.section-field:not(.hidden))) {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user