2024-07-05 12:22:31 +00:00
|
|
|
<template>
|
2024-07-09 06:50:49 +00:00
|
|
|
<div class="flex md:flex-row flex-col text-black">
|
2024-07-09 09:30:58 +00:00
|
|
|
<div class="flex flex-col justify-between cursor-pointer w-[40%]" style="min-width: 40%;">
|
2024-07-05 12:22:31 +00:00
|
|
|
<div
|
|
|
|
v-for="(el, index) in props.tabs"
|
|
|
|
:key="index"
|
2024-07-09 09:30:58 +00:00
|
|
|
class="w-full text-left border-b border-gray-400 md:text-[18px] md:last:border-b-0 md:h-full flex items-center"
|
|
|
|
style="padding: 32px 24px;"
|
2024-07-05 12:22:31 +00:00
|
|
|
@click="
|
|
|
|
showContent(index);
|
|
|
|
useRipple($event, true);
|
|
|
|
"
|
|
|
|
>
|
|
|
|
{{ el.header }}
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-07-09 09:30:58 +00:00
|
|
|
<div v-show="tabs[indexItem]" class="md:flex-1 h-auto" style="padding: 20px">
|
2024-07-09 09:18:16 +00:00
|
|
|
<div class="flex flex-col items-start h-full justify-center p-6">
|
2024-07-05 12:22:31 +00:00
|
|
|
<!-- Your image -->
|
2024-07-09 09:00:50 +00:00
|
|
|
<h1 class="font-bold text-2xl md:text-[32px]">
|
2024-07-05 12:22:31 +00:00
|
|
|
{{ tabs[indexItem].content.title }}
|
|
|
|
</h1>
|
2024-07-09 09:00:50 +00:00
|
|
|
<p class="text-[16px] md:text-[18px]">
|
2024-07-05 12:22:31 +00:00
|
|
|
{{ tabs[indexItem].content.info }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script setup>
|
|
|
|
import { ref } from "vue";
|
|
|
|
|
|
|
|
const indexItem = ref(0);
|
|
|
|
|
|
|
|
function showContent(index) {
|
|
|
|
indexItem.value = index;
|
|
|
|
}
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
tabs: Object,
|
|
|
|
});
|
|
|
|
</script>
|