fix: made detail section toggle using toggler
This commit is contained in:
parent
1b54e9c721
commit
463b2bdf7d
@ -85,25 +85,28 @@
|
|||||||
:key="section.label"
|
:key="section.label"
|
||||||
class="flex flex-col"
|
class="flex flex-col"
|
||||||
>
|
>
|
||||||
<div
|
<Toggler :is-opened="section.opened" v-slot="{ opened, toggle }">
|
||||||
class="flex items-center gap-1 text-base font-semibold leading-5 cursor-pointer"
|
|
||||||
>
|
|
||||||
{{ section.label }}
|
|
||||||
<FeatherIcon
|
|
||||||
name="chevron-up"
|
|
||||||
class="h-4 text-gray-600"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="flex flex-col gap-3">
|
|
||||||
<div
|
<div
|
||||||
v-for="field in section.fields"
|
class="flex items-center gap-1 text-base font-semibold leading-5 cursor-pointer"
|
||||||
:key="field.label"
|
@click="toggle()"
|
||||||
class="flex items-center gap-2 text-base leading-5 first:mt-4.5"
|
|
||||||
>
|
>
|
||||||
<div class="text-gray-600 w-[106px]">{{ field.label }}</div>
|
{{ section.label }}
|
||||||
<div class="text-gray-900">{{ field.value }}</div>
|
<FeatherIcon
|
||||||
|
:name="opened ? 'chevron-up' : 'chevron-down'"
|
||||||
|
class="h-4 text-gray-600"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div v-if="opened" class="flex flex-col gap-3">
|
||||||
|
<div
|
||||||
|
v-for="field in section.fields"
|
||||||
|
:key="field.label"
|
||||||
|
class="flex items-center gap-2 text-base leading-5 first:mt-4.5"
|
||||||
|
>
|
||||||
|
<div class="text-gray-600 w-[106px]">{{ field.label }}</div>
|
||||||
|
<div class="text-gray-900">{{ field.value }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Toggler>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</TabPanels>
|
</TabPanels>
|
||||||
@ -117,6 +120,7 @@ import TaskIcon from '@/components/Icons/TaskIcon.vue'
|
|||||||
import NoteIcon from '@/components/Icons/NoteIcon.vue'
|
import NoteIcon from '@/components/Icons/NoteIcon.vue'
|
||||||
import IndicatorIcon from '@/components/Icons/IndicatorIcon.vue'
|
import IndicatorIcon from '@/components/Icons/IndicatorIcon.vue'
|
||||||
import LayoutHeader from '@/components/LayoutHeader.vue'
|
import LayoutHeader from '@/components/LayoutHeader.vue'
|
||||||
|
import Toggler from '@/components/Toggler.vue'
|
||||||
import { TabGroup, TabList, Tab, TabPanels, TabPanel } from '@headlessui/vue'
|
import { TabGroup, TabList, Tab, TabPanels, TabPanel } from '@headlessui/vue'
|
||||||
import {
|
import {
|
||||||
createDocumentResource,
|
createDocumentResource,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user