make custom router-link for nav-entry to un-nest the interactive elements

This commit is contained in:
Henry Jameson 2022-08-31 00:48:38 +03:00
commit 8ecb67230c
4 changed files with 100 additions and 68 deletions

View file

@ -0,0 +1,22 @@
<template>
<router-link
v-if="to"
:to="to"
custom
v-slot="props"
>
<slot
v-bind="props"
/>
</router-link>
<slot
v-else
v-bind="{}"
/>
</template>
<script>
export default {
props: ['to']
}
</script>