2023-12-30 05:29:53 +00:00
|
|
|
<template>
|
|
|
|
<a
|
|
|
|
:class="{ active: pageContext.urlPathname === $attrs.href || active }"
|
2024-12-19 21:33:05 +00:00
|
|
|
rel="noopener"
|
2023-12-30 05:29:53 +00:00
|
|
|
>
|
|
|
|
<slot />
|
|
|
|
</a>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { inject } from 'vue';
|
|
|
|
|
|
|
|
defineProps({
|
|
|
|
active: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
const pageContext = inject('pageContext');
|
|
|
|
</script>
|