2020-03-12 14:29:21 +01:00
|
|
|
<template>
|
2022-08-26 16:08:58 +02:00
|
|
|
<li
|
|
|
|
class="bg-mbz-yellow-alt-300 text-violet-2 dark:bg-mbz-purple-500 dark:text-zinc-100 text-xl"
|
|
|
|
>
|
2022-07-12 10:55:28 +02:00
|
|
|
<router-link
|
|
|
|
class="cursor-pointer my-2 mx-0 py-2 px-3 font-medium block no-underline"
|
|
|
|
v-if="to"
|
|
|
|
:to="to"
|
|
|
|
>{{ title }}</router-link
|
|
|
|
>
|
2020-06-25 11:36:35 +02:00
|
|
|
<b v-else>{{ title }}</b>
|
2020-02-18 08:57:00 +01:00
|
|
|
<ul>
|
2020-06-25 11:36:35 +02:00
|
|
|
<slot></slot>
|
2020-02-18 08:57:00 +01:00
|
|
|
</ul>
|
|
|
|
</li>
|
2020-03-12 14:29:21 +01:00
|
|
|
</template>
|
2022-07-12 10:55:28 +02:00
|
|
|
<script lang="ts" setup>
|
|
|
|
defineProps<{
|
|
|
|
title?: string;
|
|
|
|
to: { name: string; params?: Record<string, any> };
|
|
|
|
}>();
|
2020-07-09 17:24:28 +02:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
// const route = useRoute();
|
|
|
|
// const slots = useSlots();
|
2020-07-09 17:24:28 +02:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
// const sectionActive = computed((): boolean => {
|
|
|
|
// if (slots.default) {
|
|
|
|
// return slots.default.some(
|
|
|
|
// ({
|
|
|
|
// componentOptions: {
|
|
|
|
// propsData: { to },
|
|
|
|
// },
|
|
|
|
// }) => to && to.name === route.name
|
|
|
|
// );
|
|
|
|
// }
|
|
|
|
// return false;
|
|
|
|
// });
|
2020-03-12 14:29:21 +01:00
|
|
|
</script>
|